dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Flash Actionscript Display List - Arrangement

  1. #1
    Member
    Join Date
    Mar 2004
    Posts
    51

    Flash Actionscript Display List - Arrangement

    Hey all -

    I need to control which of my movieclips is on top and which is below. However, I can't control this by making on the child of another - when I do that, my tweener animations break. What script can I use that will put movieclipA on top of movieclipB while keeping them on the same hierarchical level (ie the stage)?

    Thanks.

  2. #2
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    addChildAt
    ~calmchess~

  3. #3
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    In more detail, display children are arranged in depth according to order. With the lowest children being at the lowest depths. The displaylist is actually a tree, so if you have a structure like this:
    A
    -a1
    -a2
    -a3
    B
    -b1
    -b2
    C
    -c1
    -c2
    Then B and its children will always be between A and C and their descendants, even if you add children to B after establishing C.

    Simply add children in the right order, or use addChildAt, to make their relative positions on the displaylist match your needs.

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