Groups | Blog | Home
all groups > flash actionscript > june 2004 >

flash actionscript : on (clickevent) don't work



JE83
6/19/2004 11:48:58 PM
i have tried for hours but this script just don't work
and it is straight out of the help files
the nextframe , play , stop , prevframe , and simalar commands paired with
the on command just don't work including this one



on (release) {
nextFrame();
}


i have no idea if you have to add something or what but it is really getting
annoying
see the attached file for what i am trying to do
thanks in advance
~Flash~
6/20/2004 12:22:08 AM
Hey I'm not sure what your trying to do but first off, by starting your clip
with

stop();

it just stops everything.. everything moves at the framerate you set (default
12 frames per second).
To make the clip change to the next clip you would create a button then attach
the code to move to next frame there you would need to use the stop command
since you don't want the viewer to miss the button.

To make a button Right click on the Sqaure you made and select "Convert to
Symbol" then select "Button" name your button and then create a up, down, over,
and hit for it. Next apply the script:

on (release) {
gotoAndPlay(2);
}

That should be it.

Flash
~Flash~
6/20/2004 12:23:09 AM
Oh yeah almost forgot.. don't forget to apply

stop();

at the end of the movie clip unless you want the whole thing to restart

BSterner
6/20/2004 8:15:18 AM
actually,

gotoAndStop(2)

dmac2
6/20/2004 1:00:26 PM
If I understand your problem correctly, it is a matter of specifying paths. I
went to the file you sent and put _level0. in front of gotoAndPlay(2), so that
the script in the clip would know that you wanted the main timeline to play.
That fixed it. _parent works too. If you are going to manipulate the main
timeline from a movieclip instance in the main timeline, you need _level0 (or
_root) or _parent. They are not identical by any means but, in this particular
instance, they work identically.
Good luck!
~Flash~
6/20/2004 9:21:33 PM
lol your right BSterner good thinking

AddThis Social Bookmark Button