How do I refer to an instance from inside it's own code in Adobe Flash.
- by matt1024
In Adobe Flash, I have a movie clip that is added to the stage when the keyboard is pressed. I want it to travel across the screen and disappear once it reaches the edge of the stage. At the moment I use this but the image appears and then stops. Here is my code:
addEventListener(Event.ADDED_TO_STAGE,runtime);
var c = 0
function runtime(){
while(this.x<800){
this.x += 12;
}
removeChild(this);
}
Thanks