Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 410
  • Last Modified:

Flash - Play until a certain frame

Hello,

I'm trying to play a timeline until a certain frame.
I use "symbol.gotoandplay(40)" to play from frame 40 till the end.
But I need code to play from frame 1 to 40.

please help, thank you :)
0
ErnstJacobs
Asked:
ErnstJacobs
1 Solution
 
dgofmanCommented:
add "stop()" function on frame 40
and run "gotoAndPlay(1)
0
 
smabudhahirCommented:
Adding code 'stop()' at frame 40 and executing 'symbol.gotoAndPlay(40)' will always stop the animation at 40.

You should add the gotoAndFrame(1) in the 39th frame within the symbol. so it will loop through 1 and 39 whereas  'symbol.gotoAndPlay(40)' will continue your animation till the end.
0
 
ErnstJacobsAuthor Commented:
Thank you both, but I have to go with the first one, that was actually the most simple.

It now works with a stop at frame 39, and I've put symbol.gotoandplay(1), and it stops at 39 so it works great now :)
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now