|
-
Senior Member
dress up with layers?
Wow... it's been years since I posted here...
Hey can anyone tell me how the code that makes this file pop the clothes behind the head was done? How does it know that the coat should pop behind the head each time?
-Mike
-
I'm assuming it's setChildIndex('some number');, where the 'some number' is the level in the stacking order and controled with the MOUSE_DOWN and MOUSE_UP handlers.
it 'knows' which level to switch to with a conditional if statement with hitTestObject.
Hope this helps and leads you in the right direction.
-
Senior Member
Yes thanks that does help... I couldn't do it in Actionscript but I sorta get what you're talking about. Thanks man!
-
You could also set this up with transparent layered 'zones' - the head on top, the body below, etc - then when you release the jacket it would detect whether it's over the person (hitTest or just by coordinate) and then you'd use addChild to move the jacket into the body zone...
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
|