A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Movie order switching.

  1. #1
    Member
    Join Date
    Nov 2006
    Posts
    69

    Movie order switching.

    I am loading movies dynamically using:

    loadMovieNum("mov1.swf",1);
    loadMovieNum("mov2.swf,2);

    At some points in the running of the main movie. I need to be able to bring the contents of mov1.swf in front of mov2.swf. Is there any way to do this? Better still, is there a way for a movie to take focus when the user clicks on it?

  2. #2
    Senior Member
    Join Date
    May 2002
    Posts
    1,017
    Code:
    _level1.swapDepths(2);
    while (2+2 == 4) {
    drink ("bourbon");
    }
    gotoAndStop("bed");

  3. #3
    Member
    Join Date
    Nov 2006
    Posts
    69
    Thanks, forgot to mention though, I need to retain tweening after it has been altered. Any other ideas?

  4. #4
    Senior Member
    Join Date
    May 2002
    Posts
    1,017
    I dont think you can do that. You have to change the depths for sure and this is the only method, but the movieclip stops playing when you do it.

    You can use a workaround though:
    1.Get the _currentframe of your tween/animation
    2. Duplicate the movie at level1 into level3 (above level2).
    3.Remove the movie at level1
    4. use gotoAndPlay(_currentframe) to continue playing the duplicated movie (otherwise it will start over from frame 1)
    while (2+2 == 4) {
    drink ("bourbon");
    }
    gotoAndStop("bed");

  5. #5
    Member
    Join Date
    Nov 2006
    Posts
    69
    Cheers, that should work; knew there had to be a way.

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