Use a stop() action only once

Posted on 2010-01-08
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.
Question by:SaigonJeff
    LVL 13

    Accepted Solution

    The simplest option is to add this to the last frame


    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) {

    then on frame 2

    var count:Number  = 1;
    LVL 5

    Author Closing Comment

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

    Works like a charm !

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
    I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
    In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
    This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

    755 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

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now