ActiveDen

AS3 Swap Depths

132 posts
  • Has been a member for 4-5 years
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 1 and 9 items
  • United Kingdom
  • Referred between 1 and 9 users
smoke_e_joe says

Hello Hello Hello I’m currently working on an AS3 Gallery with PV3D and i’m trying to bring an Image to the top most level. Basically all i need is to get it to root level and be at the top thats it!

Cheers

4 years ago
2998 posts
  • Has been a member for 3-4 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Author had a File in an Envato Bundle
  • Exclusive Author
  • Sold between 100 000 and 250 000 dollars
  • Elite Author
  • Bought between 50 and 99 items
  • India
  • Referred between 200 and 499 users
VF says
If you have an MC instance named “myMc”, the following line will swap it to the top most one:
this.setChildIndex(myMc,this.numChildren-1);
[write this code on it’s parent timeline]

You can get a better guidence about alternative ways in the “Actionscript 2.0 Migration” section from Flash Help.

4 years ago
244 posts
  • Has been a member for 4-5 years
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • United States
  • Referred between 50 and 99 users
JoeMC says

You can also just do:

addChild(myMC);

which will add your MovieClip to the top layer of the timeline that you are in.

4 years ago
132 posts
  • Has been a member for 4-5 years
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 1 and 9 items
  • United Kingdom
  • Referred between 1 and 9 users
smoke_e_joe says

I’ll give it a try! cheers Guys

4 years ago
by
by
by
by
by