A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: getNextHighestDepth bug?

  1. #1
    Senior Member
    Join Date
    Feb 2004
    Location
    Worcester Ma
    Posts
    161

    getNextHighestDepth bug?

    For some reason, getNextHighestDepth() only wants to work some of the time for me. Many times, for no reason it wil give my MC a negative depth value...usually inthe negative 16,000 range. Anyone ever see this before? What doesn this mean? Could this be just another effect of global warming?

  2. #2
    :
    Join Date
    Dec 2002
    Posts
    3,518
    Yep, I've seen it.

    Items that are created in authoring mode are given a negative number. Items created dynamically at run time are given a positive number.

    Global warming - nope just the way that flash works.

  3. #3
    Senior Member
    Join Date
    Feb 2004
    Location
    Worcester Ma
    Posts
    161
    Fascinating. Thanks for the insight.

  4. #4
    Monkey Moderator Lexicon's Avatar
    Join Date
    Jul 2001
    Location
    UK
    Posts
    2,038
    fascinating, but not entirely true as you can dynamically create movieClips with a negative depth.

    Items that are created in authoring mode are given a negative number. Items created dynamically at run-time are given a depth that you specify (usually people specify a positive depth).

    getNextHighestDepth() will always give you a positive number (including 0).
    www.lexicon-design.co.uk
    If we aren't supposed to eat animals, then why are they made of meat?
    If Vegetarians like animals so much, why do they eat all their food?

  5. #5
    Senior Member
    Join Date
    Feb 2004
    Location
    Worcester Ma
    Posts
    161
    So apparently, the theory is of the pos/neg depths is to help insure that you dont knock off manually placed MCs accidentally.

  6. #6
    Senile member! :)
    Join Date
    Dec 2001
    Location
    Saunaswamp (transl)
    Posts
    2,296
    In what context does the getNextHighestDepth() return a negative number? Is there any code around that may disturb the returned value?

    So apparently, the theory is of the pos/neg depths is to help insure that you dont knock off manually placed MCs accidentally.
    Yes. One sign of that is that movieclips with negative numbers cannot be removed by removeMovieClip(). Even if they were put on stage at runtime. All movieclips on positive depths can be removed. Even though they were put on stage at author time. However putting a movieclip to an ocuppied depth during runtime will still remove whatever was occupiyng that depth.

    /Mirandir
    Last edited by Mirandir; 11-02-2005 at 08:52 AM.

  7. #7
    Senior Member
    Join Date
    Aug 2001
    Location
    Philippines
    Posts
    515
    It's very annoying.

    My movie clip was created at a depth of -16383. I thought it was getNextHighestDepth, so I manually placed "2" (the depth it's supposed to be) as the argument in getNextHighestDepth. However, the mc is still placed in -16383!

    What do I do now?
    Ramon Miguel M. Tayag

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