Alright, so I am building a custom drag/drop matching
interaction. When everything has been matched, I place a submit
button to be pressed. Because of space restrictions, I cannot place
the submit before this point. If the user decides to change their
answers around, I want the submit to unload while everything is not
matched correctly. So the submit can potentially be unloaded many
times.
What is happening is this. The first time I call the
submit.unloadMovie() the button unloads correctly. The second time
I call the submit.unloadMovie(), the button does not unload. I am
avoiding instanceName issues by passing the instance into my
function. All traces work, all functions are being called, just the
button is not disappearing. Relevant code follows:
unloadMovie problems
One question, what are you unloading? your submit
button?unloadMovie problems
right dz, but hey rr, you should use 'removeMovieClip()' for
an attachMovie call, instead of 'unloadMovie()',
also the 'this' in the 'killDisabled' method would refer to
the method's scope, try using '_level0'.
additionally, calls to 'getNextHighestDepth' can be
problematic when using the 'removeMovieClip' method (especially if
there are an Components present) and cause a return below the
lowest possible depth (-16k something) you might want to set a var
and increment it for the next depth assignment.
I changed to removeMovieClip, and it did the trick.
In my case, _level0 will not work, as the swf in question
will be loaded into a Loader component in an interface. A call to
_level0 would force me to type the entire path (ie
_level0.Loader.content.) wherein 'this' is working nicely.
Thanks for the help!
Subscribe to:
Post Comments
(Atom)
No comments:
Post a Comment