A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Multiple Button & Movie Clips

  1. #1
    Member
    Join Date
    Feb 2001
    Location
    Huntington West Virginia
    Posts
    87
    I have 3 Buttons that control 3 Movie Clips. 1 Button controls only one Movie Clip. Each Movie Clip runs for 7 seconds. The problems is if I click all 3 buttons inside the 7 seconds all 3 Movie Clip will be playing together.

    If someone clicks the button quickly I want the present Movie Clip to stop and the new one start. In other words I only want one Movie Clip to be able to play at once.

    I know this can be done, but I need some help please...Thanks

  2. #2
    Senior Member
    Join Date
    May 2001
    Posts
    323
    you could define a function on the main timeline
    Code:
    function PlayMovie(ToPlay)
    {
    movie1.GotoAndStop(1);
    movie2.GotoAndStop(1);
    movie3.GotoAndStop(1);
    ToPlay.play();
    }
    and on the button for movie1 put
    Code:
    on(release){
    _root.PlayMovie(Movie1)
    }
    and on the button for movie2 put
    Code:
    on(release){
    _root.PlayMovie(Movie2)
    }
    hope this helps

    David
    [Edited by davidmasterson on 01-13-2002 at 03:12 PM]

  3. #3
    MoFoQ
    Join Date
    Jan 2002
    Location
    Romania
    Posts
    50
    when a button is pressed just make the other two movies gotoAndPlay(1);

    i suppose you already have a stop() action on the first frame on each movie.

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