A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: target path to MC within MC using it's depth

  1. #1
    Junior Member
    Join Date
    Apr 2001
    Posts
    17
    Hi

    I need to pass a gotoAndPlay action to a MC within another MC placed on the main stage using buttons seperate from the MC instance on the stage. However I need to pass the action by refering to the depth of the MC within the MC on the stage. This is because I have a menu that changes pictures by making the top pic slide off stage and reveal the appropraite pic below using swapdepths & gotoAndPlay. I need a way to target the clip on top (the visible one) and tell it to slide off stage, and at the same time tell the clicked menu item push the appropriate pic up the stacking order to a position 1 below the clip sliding offstage.

    Hope this explains my dillema. I've been puzzling on this one for 2 nights now with no suckcess :\

  2. #2
    Beyond the Sea
    Join Date
    Mar 2000
    Posts
    997

    wow...

    sounds complex. I would say, look into the swapdepths() actionscript command. With that, you can always tell what level you're swapping to. So, whatever one is at level 11, for example, will be the one on top...

    otherwise, maybe you could post up an example?

    I don't know, anyone else?

  3. #3
    Junior Member
    Join Date
    Apr 2001
    Posts
    17
    It's really mind boggling. What i've done is tested the thing with three clips in one clip placed on the main stage. The buttons are separate from the instance on the stage. I've called the instance <i>all</i> and it contains three clips <i>green, red and blue</i> So I used the gotoAndPlay action on the button with the following path
    all.green.gotoAndplay to target the clip inside the all clip. What I need is a common variable to refer to the clip that is on top, because realisticly you can never know which clip is on top cause the user can click the buttons in any sequence.

    I've tried all.3.gotoAndPlay(2) This would make the top clip slide off stage and reveal the clip below. But no cigar.

    Thanks for responding Krakan

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