PDA

View Full Version : gotoAndPlay(); fails on me :p



Ferdi
April 24th, 2005, 06:50 AM
Hey all,

Somehow Flash won't let me do a gotoAndPlay() on a child.
In the child movieclip there is a barrel with in the first frame just a barrel and in the second frame a barrel+muzzleflash. So when I hit Key.SPACE I want the child to simply play the muzzleflash frame, how easy could that be?

I did a trace on it ( trace(this.barrel) ) and it's valid, so why wouldn't it do a this.barrel.gotoAndPlay(2); ??

Thanks in advance!:snug:

Ferdi
April 24th, 2005, 07:13 AM
Here's a simplified .fla of the barrel :)
As you can see, this doesn't work (see attachment)

Ferdi
April 24th, 2005, 07:22 AM
Sorry for the spamming, but I just found out that it does respond to gotoAndPlay(2), but when I put a prevFrame(); in frame 2 it goes wrong. Shouldn't it display frame 2 very short? Or am I making a big mistake here.


Edit: nevermind guys. Maybe you think I posted too fast, but I've been trying to fix this problem since last night :) Now I finally found the solution C:-) :whistle:

Blackspirit
April 24th, 2005, 07:29 AM
well, if you've got the prevframe in frame 2, its only going to display 1/fps of a second.
Just put a few frames in to extend the time it is displayed.

EDIT : lol oops. Me and my slow 56k replies. :)

Ferdi
April 24th, 2005, 07:35 AM
Haha no problem, thanks anyway!! ;)