dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: go to a certain frame of a loaded movie

  1. #1
    membrillo
    Join Date
    Oct 2002
    Location
    Spain
    Posts
    122

    go to a certain frame of a loaded movie

    Hi
    This must be easy, but I cannot resolve it for myself. I have a flash site with several buttons. Each of them loads a different .swf.
    Now, I want that everytime a button is pressed, the swf that is currently loaded (into a container) goes to a certain frame, to play a fade out animation. At he end of the animation it will load the movie requested depending on the variables assigned to each button, but that's another story.
    I only want to know how I tell the button to go to a certain frame of the loaded movie.
    Any advice will be appreciated

  2. #2
    Cheap Bear Imitation eRkLaErBaEr's Avatar
    Join Date
    Mar 2003
    Location
    Forests
    Posts
    308
    maybe by passing a variable or something. could look like this:
    code:

    on(press){
    movietoplay = 1;
    _root.container.gotoAndPlay(23) //or wherever you fadeout is positioned
    }


    and on the last frame of your fadeout something like this:
    code:

    _root.container.unloadMovie();
    if(movietoplay == 1){
    _root.container.loadMovie("yourswf_1", 1);
    }else if(movietoplay == 2){
    _root.container.loadMovie("yourswf_2", 1);
    }

    Pink signature?


  3. #3
    Senile member! :)
    Join Date
    Dec 2001
    Location
    Saunaswamp (transl)
    Posts
    2,296
    Well if the movies load into the same container clip you simply just tell that container clip to play().

    If you need to jump to a specific frame use a frame label that is the same in all movies.

    Code:
    // "fadeOut" is the name of the label at the beginning of the fadeout animation.
    _root.container.gotoAndPlay("fadeOut");
    /Mirandir

  4. #4
    membrillo
    Join Date
    Oct 2002
    Location
    Spain
    Posts
    122
    Thanks to you two
    Yes, Mirandir, that's what I needed. Shame on me, that was so easy. Sometimes when you are a lot of hours in front of the screen you get blocked.
    Thanks

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