A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Swapdepth understanding

  1. #1
    FK Board Loser
    Join Date
    Jul 2000
    Posts
    252
    on (press) {
    _root.square3.swapDepths("_root.square" add _root:x);
    _root:x = "3";
    startDrag ("");
    }
    on (release) {
    stopDrag ();
    }


    Please explain what is happening here

    this is the action on the button inside the movie.. on the root there is the x=1 action on the first frame. There are three squares.. so when I click on the first one it goes way on the bottom rather then coming to the top

  2. #2
    Senior Member
    Join Date
    May 2001
    Posts
    1,838
    swap beteen the depth of square3 and squareX;

    If square3 is at the bottom. sqaureX will go to the bottom. And the square3 will goto the z-order of the squareX.

    If square3 is at the top. on swapDepth, squareX will goto the top. and square 3 will go down.

  3. #3
    FK Board Loser
    Join Date
    Jul 2000
    Posts
    252
    thanks.. I standed correct.. actually one of the buttons had the wrong target path so it wasn't working correctly.. but it was..

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