import flash.display.Sprite.mouseX;
import flash.display.Sprite.mouseY;
???
import flash.display.Sprite;
:)
Gustavo Duenas wrote:
Hi Coders I have this code, is simple I want to move something using
as3, but when I do the movie test with it, it gives me this error
1172: Definition flash.display.Sprite:mouseX could not be found.same
for the mouseY, I don't understand since the code appears to be in the
import flash.display.Sprite.mouseX;
doers anyone has encountered this error, am I doing something wrong,
and please if someone knows what is would you please point which is
the error there.
I'd appreciate any help, here is the code
import fl.transitions.*;
import fl.transitions.easing.*;
import flash.ui.Mouse;
import flash.display.MovieClip;
import flash.net.*;
import flash.events.*;
import flash.display.Sprite.mouseX;
import flash.display.Sprite.mouseY;
var duration:Number = 3;
var cosilla:Sprite = new Sprite();
var cosillaLoader:Loader = new Loader();
cosillaLoader.load(new
URLRequest("http://leftandrightsolutions.com/back1.jpg"));
cosilla.addChild(cosillaLoader);
addChild(cosilla);
addEventListener(Event.ENTER_FRAME, mousecords);
var xTween:Tween = new Tween(cosilla, "x", Regular.easeOut, cosilla.x,
cosilla.x, duration, true);
var yTween:Tween = new Tween(cosilla, "y", Regular.easeOut, cosilla.y,
cosilla.y, duration, true);
function mousecords(event:Event):void {
xTween.continueTo(event.mouseX, duration);
yTween.continueTo(event.mouseY, duration);
}
Gustavo
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders