[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Use a stop() action only once

Posted on 2010-01-08
2
Medium Priority
?
218 Views
Last Modified: 2013-11-11
Can anyone tell me if it is possible to use a stop() action on the first frame of the timeline only once and then have it ignored until the movie is reloaded?

I have a simple test movie where three colored screens scroll across the stage until the required color is reached. but I want to ignore the stop() action to be skipped whenever the timeline loops back to the begining.

I only want the first frames stop() action to be used when the movie is initially loaded.

I have little experience with Flash so please treat this as a 'Newbie" question.
scrolling-test.fla
0
Comment
Question by:SaigonJeff
2 Comments
 
LVL 13

Accepted Solution

by:
crooksy88 earned 2000 total points
ID: 26211103
The simplest option is to add this to the last frame

gotoAndPlay(2);

So you don't actually revisit the first frame when the movie loops.

You can alternatively use a variable and an if statement... so on frame 1

//if count does not exist, stop
if (!count) {
stop();
}

then on frame 2

var count:Number  = 1;
0
 
LVL 5

Author Closing Comment

by:SaigonJeff
ID: 31674596
Thank you
I'm a little embarrassed that I didn't see the simplicity of your first suggestion myself.

Works like a charm !
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question