-
swapChildren / setChildAt depth issues
I've got a stage with a three movie clips on the stage from left to right next to on another in a line. These clips are nested inside of a MC which is nested inside of an MC. I'm using TweenLite to make it where mousing over one of the three images expands it but I want that MC to be the to depth and right now, only the right one is. I'm trying to use the setChildAt property but I'm getting errors and I'm wondering if this is because it's clips on the stage instead of clips being called by AS3. I'd personally rather keep the clips on the stage myself. So how can I make this work using just one function? Here's my current function code:
function photoOver(evt:MouseEvent):void {
evt.target.parent.parent.stop();
this.swapChildren(DisplayObject(evt.target), this.getChildAt(numChildren-1));
TweenLite.to(evt.target, .5, {scaleX:1.5, scaleY:1.5});
}
Adam Bell
dzign@datatv.com
--
Over 90% of all websites
suck......
Join the minority.
-
Senior Member
What errors are you getting?
-
It varies because I'm trying a lot of different combination's. But for the code I posted, I'm getting these errors when I try to mouse over an MC:
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display:isplayObjectContainer/swapChildren()
at filmstrip_fla::MainTimeline/photoOver()
Adam Bell
dzign@datatv.com
--
Over 90% of all websites
suck......
Join the minority.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|