A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Change Level of MC

  1. #1
    Junior Member
    Join Date
    Oct 2003
    Posts
    11

    Change Level of MC

    Is it possible to change the level of a movie clip while the movie is playing?

    I have a number of different movie clips onscreen, sitting one on top of the other. I want the user to be able to click on the movie clip they want, and that one comes to the front of the stage. Much like in a GUI of an OS.

    If that is not possible, how can I set it up so the most recent clip to appear on stage, is sitting on top? (the user controls when and what MC appears).

    I hope that makes sense,

    Thanks in advance

    e.

    P.S I am using MX.

  2. #2
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    You can use swapDepths() to change what mc is on top ( providing they are all in the same swf ).
    Depths are the stacking order of movieclips.

    You can either swap the depths with another mc ................

    myMovieClip.swapDepths(target)

    .............or set a new depth for a mc...........

    myMovieClip.swapDepths(depth)

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

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