Saturday, March 27, 2010

The case of the disappearing instances

My script has an object w/ a function that creates n number
of instances. There is a bit of complexity to make them move in the
right directions, but it will never do that if the instances
dissapear
immediately after the function exits. While it's running the
function, immediately after the obj is created it exists. But when
I trace it in the next line after the function call it does not.
Nowhere does the code remove it. Nowhere.



I thought it was depth but I used _root.getNextHighestDepth()
just to be safe.



If it helps, the instances are attached onto a mc clip at the
same position as another clip attached it. When I instead attached
the clip to the nested one, the clips appeared.



For added weirdness, sometimes the first instance remains but
the second one doesn't, but it is removed after awhile anyway.



What could be causing this...?The case of the disappearing instances
that's probably a depth issue. instead of using the
getNextHighestDepth() method of the _root timeline, use the
timeline to which the disappearing clips are attached.



The case of the disappearing instances
It sure seems like it, kglad. I'm using the attached
code....it should work, right?



Now it looks more like the function deletes the previous
instance. Only one exist at any time.
Le ZOMG
. It attaches them correctly now.
great.
  • scar cream
  • No comments:

    Post a Comment