This content has been marked as final. Show 5 replies
This is because the getNextHighestDepth() satement is returning the same depth as the parentClip.
var newClip:MovieClip = this.createEmptyMovieClip(buttonName, parentClip.getNextHighestDepth());
var newClip:MovieClip = this.createEmptyMovieClip(buttonName, parentClip.getNextHighestDepth() + 1);
this["testMovie"] does not point at a movieClip, you should use:
createButton("button1", "Button 1", this.testMovie, 20,20);
this["testMove"] is correct.
>>this["testMovie"] does not point at a movieClip
Sure it does - it is the same as this.testMovie. And, as he stated -
parentClip traces ok within the function.
I think it disappears because you are replacing parentClip with newClip -
what you do is create the clip 'test' within this (_level0 as you said - and
you set the depth of that new clip to the next highest within the clip. Next
you run the function which creates newClip - within level0 also - but you
are getting the depth from parentClip, which is probably the same as the
last depth from root...
Adobe Community Expert
no probably about it. they (parentClip and newClip) going to be placed at depth 0 on the "this" timeline so newClip is going to replace parentClip.