A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: swapdepths problem

  1. #1
    Join Date
    May 2006

    swapdepths problem

    Hý u all, here my situation:
    I have 4 mc on the stage (mc1,mc2..), each mc has a mc inside (in_mc1,in_mc2..) that onPress have to bring the respective mc on the front.

    first frame

    in the first frame of each mc I have

    this code brings the pressed mc on the top of the others, but if I have on top mc1, then mc2 and then mc3 and I press mc2 p.e happens that mc2 is on top but mc3 is over mc1.
    Anybody has an idea what's missing in my code???

  2. #2
    Moderator whispers's Avatar
    Join Date
    Mar 2001
    CFA2h (respect the HEX)
    ?? thats how its supposed to work..


    you click on mc1..it goes to depth "5" (we'll say)
    you click on the next MC (mc2) and it goes to depth 6.
    you click on mc 3..it will go to depth 7 still leaving mc2 on depth #6 and mc1 on depth #5...

    so if you click on mc 2 again (making it depth 8) you have still left mc1 on deth 5 which is lower/under than mc3 on depth 6...

    make sense??

  3. #3
    Join Date
    May 2006
    it seems I solved the problem changing the code this way:

    var i:Number = 20;

    mc1.in_mc1.onRelease = function(){
    mc2.in_mc2.onRelease = function(){
    mc3.in_mc3.onRelease = function(){

    I don't really understand why this way it works, but it does..

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