Xoxo
December 28th, 2007, 05:21 PM
Hello everybody!
I'm trying to make an swf with an effect of a magnifier, and I have this code in moveMag.as:
package {
import flash.display.MovieClip;
import flash.display.Stage;
import flash.events.Event;
import flash.events.MouseEvent;
public class moveMag extends MovieClip {
stage.addEventListener(MouseEvent.MOUSE_MOVE, moveMag);
public function moveMag(e:MouseEvent):void {
magnify.x=e.stageX;
magnify.y=e.stageY;
big.x=(small.width/ big.width)-e.stageX-magnify.width/2;
big.y=(small.height/ big.height)-e.stageY-magnify.height/2;
}
}
}
In my fla file I have a mask, and two images (big and small) in different layers.
When I test I get an error: Error 1120 "stage" property not defined
Any ideas for fixing this? Thank you very much!
I'm trying to make an swf with an effect of a magnifier, and I have this code in moveMag.as:
package {
import flash.display.MovieClip;
import flash.display.Stage;
import flash.events.Event;
import flash.events.MouseEvent;
public class moveMag extends MovieClip {
stage.addEventListener(MouseEvent.MOUSE_MOVE, moveMag);
public function moveMag(e:MouseEvent):void {
magnify.x=e.stageX;
magnify.y=e.stageY;
big.x=(small.width/ big.width)-e.stageX-magnify.width/2;
big.y=(small.height/ big.height)-e.stageY-magnify.height/2;
}
}
}
In my fla file I have a mask, and two images (big and small) in different layers.
When I test I get an error: Error 1120 "stage" property not defined
Any ideas for fixing this? Thank you very much!