A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [F8] SwapDepths AS for Buttons?

Threaded View

  1. #1

    [F8] SwapDepths AS for Buttons?

    Hi -

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

    I have a movie that has a "Welcome" sub-menu that has four sub-menu 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. So I am trying to setup my "Outside" button to move forward elements by using the SwapDepths AS on release. My problem is, it brings the MovieClip forward - even over top of my menu and logo, so I assigned all of the instances (buttons and MCs) with instance names, and call them in the code below. How can I code it not to go over those without assigning a specific number depth to every symbol? Or is that the proper way to do it? It isn't working properly, and I'm stuck at how to make it work. Any ideas? I've uploaded the Flash file for review, if it helps, to: http://www.ijdesign.com/LBA/LBARealty-Demo5.fla - it is 3.32MB.

    on (release) {

    this.welcomebtn.swapDepths(99);
    this.outsidebtn.swapDepths(98);
    this.insidebtn.swapDepths(97);
    this.officesbtn.swapDepths(96);
    this.environbtn.swapDepths(95);
    this.line1.swapDepths(94);
    this.line2.swapDepths(93);

    this.bar.swapDepths(92);
    this.whitebox.swapDepths(91);

    this.denverplace.swapDepths(90);
    this.blend.swapDepths(89);

    this.outsidetext.swapDepths(88);
    this.outside.swapDepths(87);

    this.welcomephoto.swapDepths(86);
    this.welcometext.swapDepths(85);
    this.insidephoto.swapDepths(84);
    this.insidetext.swapDepths(83);
    this.officestext.swapDepths(82);

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

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


    }
    Last edited by Idelle; 03-06-2008 at 12:03 PM.

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