A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: how can I stop my movie from looping?

  1. #1
    Member
    Join Date
    Jan 2005
    Location
    Philadelphia
    Posts
    41

    how can I stop my movie from looping?

    I used the tutorial on 'Loading movies into target: Flash MX' from http://www.kirupa.com/developer/mx/l...:%20Flash%20MX
    and got my movie loaded and playing when a button is pushed. However, it loops over and over. What can I do to stop it from looping and make it go back to the menu when it's done playing?

    thanks

  2. #2
    Senior Member snorepez's Avatar
    Join Date
    Mar 2004
    Posts
    610
    On the last keyframe of your movie, add this:
    code:

    gotoAndStop("menu");



    "menu" being where your menu is located on the timeline.
    Flash is amor; nada more.

  3. #3
    Member
    Join Date
    Jan 2005
    Location
    Philadelphia
    Posts
    41

    not quite

    The problem is, I don't think i can edit that movie again. I made that movie awhile ago, and now loaded the SWF file of it in for when I want it to play. I don't think I can add that code into that movie because I no longer have the project file for it. Is there any way I can still make it stop playing/stop looping?

  4. #4
    Senior Member snorepez's Avatar
    Join Date
    Mar 2004
    Posts
    610
    Well, that would have been nice to know

    Im assuming you're loading your movie into an empty movieclip. So put this on the main timeline, and give it an instance name.
    code:

    if (loadedMovieName._currentframe == 40) {
    loadedMovieName.stop();
    }



    loadedMovieName being the instance name of the empty movieclip, and the number 40 being the frame where you want the movie to stop looping.

    :edit: put the above code on the main timeline, not the movieclip.
    Last edited by snorepez; 01-23-2005 at 04:29 PM.
    Flash is amor; nada more.

  5. #5
    Member
    Join Date
    Jan 2005
    Location
    Philadelphia
    Posts
    41

    thanks

    thanks for the help, although i'm not sure if i'll be able to use that or not - (I don't know how many frames it is)

    thanks though!

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