A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: dress up with layers?

  1. #1
    Senior Member milowerx's Avatar
    Join Date
    May 2002
    Location
    Los Angeles
    Posts
    278

    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
    -Mike
    =============================

    FLASH PORTFOLIO

    DESIGN PORTFOLIO

    STORYBOARDS

    FILMS

  2. #2
    Member
    Join Date
    Dec 2004
    Posts
    68
    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.

  3. #3
    Senior Member milowerx's Avatar
    Join Date
    May 2002
    Location
    Los Angeles
    Posts
    278

    Thumbs up

    Yes thanks that does help... I couldn't do it in Actionscript but I sorta get what you're talking about. Thanks man!
    -Mike
    =============================

    FLASH PORTFOLIO

    DESIGN PORTFOLIO

    STORYBOARDS

    FILMS

  4. #4
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center