A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: swapDepth, as2

  1. #1
    Junior Member
    Join Date
    May 2008
    Posts
    1

    swapDepth, as2

    hey,
    flash cs3, as2, i have a movie clip that is a panel composed of multiple little image, in this MC each little image is a MC itself, with this code on:
    onClipEvent(enterFrame){
    if(this.hitTest(_root._xmouse, _root._ymouse)){
    this.nextFrame();

    }
    else {
    this.prevFrame();
    }

    }

    in each of this lil MC you have a rollover animation, that brings the concerned image to the center of the stage and then scale up,
    my pb is that this animation happens behind the movie clip, how do i bring it in front?
    heeeeeeelp!
    thanks

  2. #2
    Senior Member Robb@exo's Avatar
    Join Date
    Jun 2003
    Location
    Canada
    Posts
    1,540
    You could try using swap depths... something like this,
    PHP Code:
    myMC1_mc.onRelease = function() { 
        
    this.swapDepths(myMC2_mc); 
    }; 
    myMC2_mc.onRelease = function() { 
        
    this.swapDepths(myMC1_mc); 
    }; 
    Another possibility would be to look at changing the getNextHighestDepth();

    HTH.
    Wile E. Coyote - "Clear as mud?"

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