This content has been marked as final. Show 6 replies
Ahh i see your error, you are using this inside the onMotionFinished function... however you are inside "myTweenX" and not inside myCom, try this._parent inside the myTweenX.onMotionFinished function...
I have tried this and several other variations but no success.
It seems to be a pathName problem but I can't figure out where the tween (object!) is in relation to the 'myComp' instance. I tried calling a global function (test(_parent.id_number)) in the onMotionFinished function as a test but the id_number comes back as undefined.
The global function is just:
Using the Tween class callbacks can be a pain. For some reason, their pathing is handled differently than other objects. The path to your parent_mc from inside the onMotionFinished callback will be:
You didn't explain the 'obj' bit and how I define it.
Anyway, I have done a work around by placing a movieClip in the component to handle the tween and call the moveFinished function in the component when it's done.
There must be a way to call the same moveFinished function from within the moveComp.myTweenX.onMotionFinished function.
Thanks for the responses.
The movieClip code is this:
You dont define the obj bit, its a preexisting property of tween objects that references the scope in which they were created. If you want to call the moveFinished function, which looks like it resides at the _parent of the MC that holds the tween:
should do the trick.
Thanks for your help Tony - works fine now. I also send the id_number when I call the function so it now looks like this.