[Flashcoders] where did the mouseX go?

2009-03-11 Thread Gustavo Duenas



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
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] where did the mouseX go?

2009-03-11 Thread Glen Pike

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
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] where did the mouseX go?

2009-03-11 Thread Fabio Pinatti
Event types doesn't have mouseX. Only MouseEvent has, and even, you should
use target or currentTarget and get it.

ie:
addEventListener(MouseEvent.CLICK, mousecords);

function mousecords(event:Event):void {
xTween.continueTo(event.target.mouseX, duration);
yTween.continueTo(event.target.mouseY, duration);
}

or in your case, just use the mouseX directly from object:

function mousecords(event:Event):void {
xTween.continueTo(getChildByName(your_cosilla_name).mouseX, duration);
 yTween.continueTo(getChildByName(your_cosilla_name).mouseY, duration);
}


Hope that works for you
F


On Wed, Mar 11, 2009 at 2:18 PM, Gustavo Duenas 
gdue...@leftandrightsolutions.com 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
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




-- 
Fábio Pinatti
:: web.developer
 www.pinatti.com.br
:: 19. 9184.3745 / 3342.1130
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] where did the mouseX go?

2009-03-11 Thread David Hershberger
mouseX and mouseY are member variables of the Sprite class.  You don't need
to import member variables, only classes.  Once you import the Sprite class,
all the members come with it.

replace your mouseX and mouseY imports with:

import flash.display.Sprite;

and you'll be golden.

Dave

On Wed, Mar 11, 2009 at 10:18 AM, Gustavo Duenas 
gdue...@leftandrightsolutions.com 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
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] where did the mouseX go?

2009-03-11 Thread Gustavo Duenas
Thanks, I 've just solved minutes ago, apparently it gives me the  
error when the part of the function is

xTween.continueTo(event.MouseX, duration);
so I've just erased the event part , it is now:
xTween.continueTo(MouseX, duration);
so now is ok.

:)

any explanation though?
I guess flash was trying mouseX as a property, when is not.

Gus
On Mar 11, 2009, at 1:46 PM, Glen Pike wrote:


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
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders






___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] where did the mouseX go?

2009-03-11 Thread Fabio Pinatti
have you received mine or list emails? hope it's clear if you did..

pinatti

On Wed, Mar 11, 2009 at 3:48 PM, Gustavo Duenas 
gdue...@leftandrightsolutions.com wrote:

 Thanks, I 've just solved minutes ago, apparently it gives me the error
 when the part of the function is
 xTween.continueTo(event.MouseX, duration);
 so I've just erased the event part , it is now:
 xTween.continueTo(MouseX, duration);
 so now is ok.

 :)

 any explanation though?
 I guess flash was trying mouseX as a property, when is not.

 Gus

 On Mar 11, 2009, at 1:46 PM, Glen Pike wrote:

  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
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders





 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




-- 
Fábio Pinatti
:: web.developer
 www.pinatti.com.br
:: 19. 9184.3745 / 3342.1130
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders