dcsimg
A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Depth Sorting

  1. #1
    Member
    Join Date
    Nov 2003
    Location
    LA, US
    Posts
    65

    Depth Sorting

    I'm making a 3/4 view game, can anyone give me a way to set the "Depth" value of an image?

  2. #2
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    the command is element.swapDepth(element)

    They start out in the order of creation so you need to know where they start, then swapdepth to move behind.

    Looking forward to seeing what you come up with.

  3. #3
    Member
    Join Date
    Nov 2003
    Location
    LA, US
    Posts
    65

    Actionscript

    I came up with ignoring the way the IDE misinterperets actionscript.

    BOB.Swapdepths(BOB.Ylocation)

    will do the job in MX, so I just ignored that it doesn't work in the IDE, as it works great in browser =]

    Hopefully soon the IDE will support it.

  4. #4
    Senior Member lopez1_de's Avatar
    Join Date
    Oct 2001
    Location
    Germany
    Posts
    299
    syntax: object_1.SwapDepth(object_2)

    i think that object 1 is now in front of object 2.

    its a hard job to swap 20 things the same time.

  5. #5
    Member
    Join Date
    Nov 2003
    Location
    LA, US
    Posts
    65

    Actually

    Without using actionscript and ignoring the 3DFA IDE, there's no way I've found to figure out which object is in front of which.

    Actionscript even has a getDepth() which returns the "depth" value. Basically, the draw order, so higher values are on top of lower values.

    =)

  6. #6
    Senior Member lopez1_de's Avatar
    Join Date
    Oct 2001
    Location
    Germany
    Posts
    299

    Re: Actually

    Originally posted by Arne The Turtle
    Without using actionscript and ignoring the 3DFA IDE, there's no way I've found to figure out which object is in front of which.

    Actionscript even has a getDepth() which returns the "depth" value. Basically, the draw order, so higher values are on top of lower values.

    =)

    OLD BUT IMPORTANT FOR ALL!!!

    you can use ALL Flash MX actionscript commands in 3DFA. just look into flash documentation or use google.
    visit my homepage -> ejected.de

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