A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Depth/Layer transitions in a movie

  1. #1
    Guest
    Hey, I'm using Flash MX and basically, I have something that spawns many sprites (DuplicateMovies) in front of the player. They do their animation and then stop. I'm wondering if there is a way to get the object to move behind the player, graphically, when it's done by putting an action in the last frame of the animation. The layer the sprites that are being duplicated are already on a layer behind the player, but they spawn in front, anyway. So, are there any commands I can use move them?

    Thanks.

  2. #2
    Member
    Join Date
    Mar 2002
    Location
    Australia
    Posts
    49

    reply

    Although you work with the layers in the development area,
    flash is really controlled by levels (see _level). Components can be loaded and unloaded above and below others. One of the easiest ways to control ordering is make empty 'container' clips and place these in specific levels (depending on waht you want to achieve of course) and make these the targets to load your movies into. Using the swapDepths function will help you manipulate the ordering of movie clip components during runtime.

    Anyway I suggest you check out the above functions. So far all I can suggest is that you have the player in say a container clip on _level2 and the 'spawning sprites' loading into in a empty container clip on _level1 with the script


    loadMovie("this.swf", _level1.sprite_Mc)


    -Rich

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