package{ import flash.display.MovieClip;
import flash.display.Shape;
import flash.events.*;
import flash.text.TextField;
public class ball extends MovieClip{
public function ball(){
this.addEventListener(Event.ADDED,addHd);
}
private function addHd(e:Event){
this.stage.addEventListener(Event.ENTER_FRAME,enterFramehandler);
this.removeEventListener(Event.ADDED,addHd);
}
private function enterFramehander(e:Event):void
{
if(this.blam.hitTestPoint(shot.x,shot.y,true))
this.blam.play();
this.stage.removeEventListener(Event.ENTER_FRAME,enterFramehandler);
}
}
}
import flash.display.Shape;
import flash.events.*;
import flash.text.TextField;
public class ball extends MovieClip{
public function ball(){
this.addEventListener(Event.ADDED,addHd);
}
private function addHd(e:Event){
this.stage.addEventListener(Event.ENTER_FRAME,enterFramehandler);
this.removeEventListener(Event.ADDED,addHd);
}
private function enterFramehander(e:Event):void
{
if(this.blam.hitTestPoint(shot.x,shot.y,true))
this.blam.play();
this.stage.removeEventListener(Event.ENTER_FRAME,enterFramehandler);
}
}
}
