A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: stop/start button

  1. #1
    Member
    Join Date
    Apr 2001
    Posts
    39
    how is it possible to have a button that pressed once stops a movie and then when pressed starts it again.

    it is easy to do if you have seperate buttons
    but i only want one

  2. #2
    Senior Member
    Join Date
    Jun 2000
    Posts
    1,180
    Hi...
    The following example stops and starts the main timeline:

    1) Insert/New Symbol/Movie.
    2) Frame1: Add a button with the script:

    on (release) {
    _root.play();
    gotoAndStop (2);
    }

    3) Add a blank keyframe at frame 2 and place another instance of the same button there. Add the script:

    on (release) {
    _root.stop();
    gotoAndStop (1);
    }

    Good luck.

  3. #3
    Member
    Join Date
    Apr 2001
    Posts
    39
    Originally posted by Marx
    Hi...
    The following example stops and starts the main timeline:

    1) Insert/New Symbol/Movie.
    2) Frame1: Add a button with the script:

    on (release) {
    _root.play();
    gotoAndStop (2);
    }

    3) Add a blank keyframe at frame 2 and place another instance of the same button there. Add the script:

    on (release) {
    _root.stop();
    gotoAndStop (1);
    }


    does it matter though if the movie i am trying to control
    is another movie residing in the main timeline

    olison
    Good luck.

  4. #4
    Senior Member
    Join Date
    Jun 2000
    Posts
    1,180
    Hi..
    Makes know difference, all you need to do is adjust the scripts so they point to the MC your targeting.

    on (release) {
    myMovie.play();
    gotoAndStop (2);
    }

    Hope this helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center