//create a movieclip, delete from stage
//edit Linkage (in library)
//check "Export for ActionScript"
//give it Class name of Bubble
//every time you move the mouse it calls the event
stage.addEventListener(MouseEvent.MOUSE_MOVE,addBubble,false,0,true);
//edit Linkage (in library)
//check "Export for ActionScript"
//give it Class name of Bubble
//every time you move the mouse it calls the event
stage.addEventListener(MouseEvent.MOUSE_MOVE,addBubble,false,0,true);
function addBubble(e:MouseEvent):void{
var myBubble:MovieClip = new Bubble(); //creates a new instance
addChild(myBubble); //adds it to the stage
myBubble.x = mouseX;
myBubble.y = mouseY;
}
//animate movieclip with frames
//add this code to final frame of movieclip
stop();
parent.removeChild(this); //kills itself
var myBubble:MovieClip = new Bubble(); //creates a new instance
addChild(myBubble); //adds it to the stage
myBubble.x = mouseX;
myBubble.y = mouseY;
}
//animate movieclip with frames
//add this code to final frame of movieclip
stop();
parent.removeChild(this); //kills itself


0 comments:
Post a Comment