|
-
Professional Air Guitarist
gotoAndPlay problems
I've asked about this several times, but no one seems to know the answer. I'm re-writing this to get my thread on the top .
I have a movie clip that is mentally retarded. There is a button inside of the movie clip that has this action:
on (release) {
gotoAndPlay("lvl1", 1);
}
This "special" button decides that it's not going to go to and play scene "lvl1" frame 1, but play the movie clip it is in.
Any idea why this happens???
-thanks again,
Last edited by Frag; 12-15-2002 at 09:39 PM.
-
:: rolla ::
use this code
Code:
on (release) {
_root.gotoAndPlay ("lvl1", 1);
}
-jake
-
Professional Air Guitarist
thanks for responding, but it didn't work
-
:: rolla ::
what happens when you do that?
-
:: rolla ::
post your .fla, and ill have it fixed in a jiffy.
-
Professional Air Guitarist
-
:: rolla ::
-
Professional Air Guitarist
-
Professional Air Guitarist
-
:: rolla ::
sometimes its better to give the frame a label. label the frame "one" and make your code this
Code:
on (release) {
_root.gotoAndPlay ("lvl1", "one");
}
-jake
-
Professional Air Guitarist
-
:: rolla ::
is it the advance button?
i g2g, ill finish this with ya tommorow
-jake
-
Professional Air Guitarist
ypu have to lose... its the restart button
-
Young Senior Member
u can do the following: instead of posting your fla with your game, experiment with a simple movie to test whether gotoAndPlay a certain scene works. if it doesnt, meaning you have recreated the problem in a simpler scenario, post that fla. or, instead of gotoAndPlay scene, you can gotoAndPlay the frame number. i tested with your swf and it works. the thing with scenes is that even if its the first frame of a different scene, it's frame number still follows from the frame number of the prev scene, so it will always work. i used gotoAndPlay(30) in your swf, it works, but i suspect the number can be smaller.
-
:: rolla ::
is "lvl1" frame 1, the very beginning of the movie?? if so, why refer to the scene?? you could just have it like restart everything, i think that would be easier.
_root.gotoAndPlay(1);
i dunno how that could mess up?? unless its not getting through to the root timeline, which i dont see how it couldnt???
-jake
-
you must use framelabels in this situation...
Code:
//assuming the first frame of scene lvl1 is labled lvl1
_root.gotoAndPlay("lvl1");
-
Professional Air Guitarist
actually i just used:
_root.gotoAndPlay(22)
// where 22 is the frame number for the entire movie
and it worked!!
-
Registered User
Ha, I been testing this same thing myself. using _root.gotoAndPlay(??). It's really much more dependable than even frame labels. all ya got to do is be able to count.
-
Originally posted by iaskwhy
Ha, I been testing this same thing myself. using _root.gotoAndPlay(??). It's really much more dependable than even frame labels. all ya got to do is be able to count.
buut if you add one frame to the beginning of your movie you have to update all of your framenumber references... it's okay for the less complex things but framelables will be better in the long run and/or when updating or enhancing the movie...
-
Registered User
I know, nothing is perfect, but I don't often add frames to the main timeline. Using root frame numbers works first time, every time. In the long run, I'll probably save more time doing it that way than trying to hunt down why my frame label isn't working.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|