PDA

View Full Version : is movieclip moving?



pi3rc3
April 5th, 2007, 07:27 PM
im trying to make a function that tells me if my movieclip is moving


var thisPosition:Vector = new Vector(this.px,this.py);
if(thisPosition.x == lastPosition.x && thisPosition.y == lastPosition.y){
//movieclip isnt moving!
}else{
//inMotion = true;
}
lastPosition = new Vector(this.px,this.py);

but it doesnt work! how come? im using as3 btw

pi3rc3
April 5th, 2007, 07:31 PM
err could someone move this to actionscript forum?