Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Animal extends MovieClip{
- private var speed:Number;
- public function Animal(){
- speed = 5;
- name = "Animal";
- }
- public function run(): Void{
- onEnterFrame = function(){
- _x += speed;
- }
- }
- public function stop(): Void{
- delete onEnterFrame;
- }
- private var balloon:MovieClip;
- private var name:String;
- public function setName(name:String): Void{
- this.name = name;
- }
- private function onRollOver():Void{
- balloon = attachMovie("balloon", "balloon", 0);
- balloon._x = _xmouse;
- balloon._y = _ymouse - 50;
- balloon.name.text = name;
- }
- private function onRollOut(): Void{
- balloon.removeMovieClip();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement