Question
add/remove child - Programming Practices
Greetings All,
I have a general question in terms of actionscript programming, and movie clips on stage.
I have an application that can add (or remove) children to the stage (or from the stage).
When I click a button I want to run a tween that moves an object on the stage.
When I click that same button again - I no longer want to run the tween, but allow some other action on the stage.
I have two movie clips associated with this process (not counting background object, etc).
One clip moves with the tween and its settings, the other just appears on the stage over the other objects.
I can addChild/removeChild for these clips, alternating as required, or add all the children to the stage, and either do a get/set Childindex kind of thing, or visible true/false kind of thing. I would also like to consider removing the tween.
Is there a way to remove a tween (after "adding" it using the var myTween:Tween = new Tween()).
My question is what would a good actionscript programmer do in this circumstance??
Thanks for a good forum here.
eholz1
I have a general question in terms of actionscript programming, and movie clips on stage.
I have an application that can add (or remove) children to the stage (or from the stage).
When I click a button I want to run a tween that moves an object on the stage.
When I click that same button again - I no longer want to run the tween, but allow some other action on the stage.
I have two movie clips associated with this process (not counting background object, etc).
One clip moves with the tween and its settings, the other just appears on the stage over the other objects.
I can addChild/removeChild for these clips, alternating as required, or add all the children to the stage, and either do a get/set Childindex kind of thing, or visible true/false kind of thing. I would also like to consider removing the tween.
Is there a way to remove a tween (after "adding" it using the var myTween:Tween = new Tween()).
My question is what would a good actionscript programmer do in this circumstance??
Thanks for a good forum here.
eholz1