How do I get the movie to loop a specify amount of times.
I want the movie to loop 3 times only.
Thanks!:)
Printable View
How do I get the movie to loop a specify amount of times.
I want the movie to loop 3 times only.
Thanks!:)
Well, you could have a variable written to each time it loops,,,
I have included a FLA that accomplishes this, I hope it helps....
Note: In the fla, there is a symbol that is animated (animation within the MC). In frame one of the mc (its a ball), I set two variables. One for how many times it should loop, and the other just declaring for a counter. On frame 20, there is an conditional that either stops the movie if the counter var equals the howManyTimes it should loop variable (one of the two vars set in frame one of the ball symbol), or it increments the counter var and goes to frame two (because one of the vars declared in frame 1 gets incremented in frame 20, we cannot loop back to frame 1 (it would reset the counter to zero and we'd be in an infinite loop)).
Thank you for taking the time to post back.
I will try it, it sounds kind of complicated for me, but I will give it a try. I was hoping it was just a matter of including a param tag to the html.
Appreciate it!
what if i want to redirect to an specific URL after the 3 loops?
Ifields ---
Look at the file MyKal100 provided. It works and it's a great starting foundation for what you can do with looping. Take a look at his coded frames. The first frame of code is the variable. The last frame of code is the If Then statement based on the variable.
If you look at the first part of the code in the last frame, you'll see
if (countMe==howManyTimes) {
stop();
That is saying that if the movie has played 3 times, then "stop", in which the player will stop on that particular frame. Replace the stop(); code with a "getURL" function. Like this exactly but replace the full URL path with your own:
getURL("http://www.yourdomain.com");
Hope that helps. MyKal100 just helped me big time even though the post is 4 years old.
CCSCREATIVE,
My post was for you instead of Ifields. Sorry.
thx mykal100!