Hi guys, this is probably more of general Actionscript query than a specific Greensock one, but you guys are sooooo good I thought I'd try here first!
I have picked out this particular pieces of code from my timeline that will expose an image from underneath another image that is on a different layer -
//code that calls the function to bring image to front
timeline.append( TweenMax.to(image_05, 1, {x:320, onStart:bringToFront, onStartParams:[image_05]}));
//function that brings the layer to the front
function bringToFront(object:DisplayObject):void {
object.parent.addChild(object);
}
This all very nice when first run, but the timeline is on an infinite loop so when it spins back round to the start again, the image that I've exposed is sat on top everything (until other layers start to take precedence)...booo! I'm a complete noob when it comes to Actionscript, I've had a search around and I see lots of things about swapdepths and removechild and I've given them all a whirl but I end up with errors galore!
Could someone help me simply reset the layer to it's original state when the loop restarts pleeeease?!
Cheers, Rob