7/17/2011 6:46:59 AM
Title:
coding for a game
I am trying to build a game where children make a sandwich. using movie clips and drag and drop, I can not figure out how to make the objects go to the top. right now they are going accourding to where they are on timeline. I have searched tutorials and no luck. can you help. should I make them buttons.
Thank you
Jennifer
7/17/2011 7:21:53 AM
you an use the swapDepth function in flash to bring the clicked object to top .
See this tutorial
http://www.kirupa.com/developer/actionscript/swapdepth.htm
7/17/2011 7:24:10 AM
for actionScript 2.0 you can use
// this will swap the level of movie1 with movie2
movie1.swapDepth("movie2");
for actionScript 3.0 you can use
swapChildren(movie1,movie2)