View Single Post
Old 03-30-2009, 11:09 AM   PM User | #2
pspsully
New Coder

 
Join Date: Feb 2006
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
pspsully is an unknown quantity at this point
Nevermind,

I just figured out that flash cannot handle Clip Events with mixed in AS at the same time, it will prioritize AS over the Clip.

The solution was to write the tween in AS, is looks something like this:

Code:
Graphic1._x = xposition;
Graphic1._y = yposition:

var i:Number = xposition;

if(i>0){
i = i - 10;
Graphic1._x +=-10;
}
Basically the above is fine for what i wanted, it moves the Graphic1 Movie clip from right to left by 10px every frame until it hits 0 on the x axis.

It would have a problem if the x position origianal passed was not an exact divisional of 10, it would go slightly off screen, to fix that, i have changed the if(i>0){ line to if(i>10){. The after that has run i tell it to position it to 0.

Thanks,
pspsully

Last edited by pspsully; 03-30-2009 at 11:12 AM..
pspsully is offline   Reply With Quote