Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: FLASH: Help! My game gun is shooting blanks...
From: John Petroshius
Date: Mon, 16 Oct 2000 16:04:13 +0100

Hello folks

(excuse me if I've written too much, I just wanted to explain myself as
fully as possible :)

I'm putting a duck hunter game together (it's my client's idea; we wanted to
do a Kafka-esque cockroach game)...and this is my first try at Actionscript
(I started with FLASH 4 and now I'm stuck using the older scripting for the
duration of this project)...I've got a nice gunsight, and set it up ok to
lock to my cursor...so far so good...

and I have a Duck MC, which is comprised of two inner MC's...

there's a short DuckFlap MC on frame 1 of the enclosing Duck MC with my duck
flapping away contentedly...and a second movie clip, DuckDie sitting on
frame 2 of the larger Duck MC...

I have an Actions layer and a Stop action placed on frame 1 of that layer in
the Duck MC...so my DuckFlap MC continues to flap away until he's shot at...

but when I set my button instance in my gunsight-cursor MC to target and
play the DuckDie MC when the cursor clicks on the Duck MC, I don't get the
DuckDie MC to play...? which is driving me daffy (duck)...I hope I'm just
missing something real simple...

maybe I should include some of my code for the cursor-button instance:

for my cursor I have a Movie Clip and inside it on frame 1 of an Actions
layer I have my cursor/lockcenter code stuff...then on frame 2 of the
Actions layer I have a Stop action...on frame 1 of my Graphics layer I have
an empty frame, and on frame 2 of the Graphics layer I have my button
(inside the button itself there's an Up state, a Down state with a gun sound
attached, and no Over or Hit state)...

...the code for the button instance itself is basically like:

On (Release)
If (GetProperty("",_droptarget) eq "/Duck MC instance name")
Begin Tell Target ("/Duck MC instance name")
Play
End Tell Target
End If
End On

I had been told that by targeting the over-all MC and telling it to Play, it
would get the playback head off the Stop on frame 1 of the larger Duck MC
and that would automatically take it to frame 2 and that would start the
DuckDie MC...inside that MC there is an interior Stop action, so it only
will play once, and the whole clip should then die...I've tried targeting
the inner clip by saying

Begin Tell Target("/Duck MC instance name/DuckDie instance name")

and several permutations with these kinds of substitutions...but no go...
any sugessstions out there where the gurus live? thanks a lot in advance
for any help or clues...


Addendum:

all this stuff seems to work ok if I don't use MC's...I mean, if I take the
frame animations that are included in the MC's, and just spread them out in
a linear fashion in the one big MC and just use a go to frame 1 at the end
of the DuckFlap sequence, and a label at the beginning of the DuckDie
sqeuence, then I can target everything successfully from actions I include
in my cursor-gunsight...for several reasons though, I would REALLY like to
be able to just say, "when I click my gunsight on this MC, please go inside
this big MC and play some littler MC that's sitting on one of the interior
frames of the big MC"...

thanks again for any thoughts on the subject...

John Petroshius
johnatprairiestudio [dot] com
847-675-5790


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NudeGuru.com is proud to sponsor the Flasher list
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IT'S THE ART OF MONEY, HONEY!
Tips and Advice from some of the most popular Flash
artists + industry power-brokers on how to hold onto
your rights, negotiate contracts and get full value
for your work.http://www.nudeguru.com from Franke James
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]