A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Button - SwapDepths Actionscripting

  1. #1

    Button - SwapDepths Actionscripting

    Hi -

    I have a movie that I am using a sub-menu that has buttons that each tell a certain MovieClip to play. Problem is, the movie clips all overlap eachother - and I can't figure out how to bring the MC that is associated with the clicked button to the front. I thought I could use the swapDepths Actionscripting - but I'm not sure how to use this with a button's Actionscript code. I tried the following, but it doesn't seem to work. Do the Movieclips have to all be on one layer? Here is the link to the Flash SWF -- the menu I'm referring to is the only working one, the Welcome menu. Currently I have the buttons Actionscripted to tell all the other MovieClips to go to and Stop at Frame 1 -- but this is not really ideal...

    http://www.ijdesign.com/LBA/

    Trying this code:

    on (release) {

    this.outsidephoto.swapDepths(_root.getNextHighestD epth());
    this.outsidetext.swapDepths(_root.getNextHighestDe pth());



    //Movieclip GotoAndPlay Behavior
    this.outsidetext.gotoAndPlay("2");
    //End Behavior

    //Movieclip GotoAndPlay Behavior
    this.outside.gotoAndPlay("2");
    //End Behavior

    }


    Thanks for any help!

  2. #2
    mentally unstable member smayer72's Avatar
    Join Date
    Jan 2001
    Posts
    527
    can you tell all other clips to have alpha value of 0, then when clicked on bring it to 100. This way depth not an issue. Just a thought. If not post the fla. Make it easier to help.

    Cheers
    Scott (Australia)

    Sarcasm, chaos and disorder. My work here is done!

    **Mark you threads as [RESOLVED] please.**

  3. #3
    If I tell the other clips to have an alpha value of 0, then they'll just disappear --- the desired effect is that the movie clip opens over the other opened movieclip (it has a mask that "reveals" a photo). I want it to open over top the other open button movieclips (but still behind the main menu bar and logo). Does this make sense?

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