-
I am using this actionscript to obtain a certain movement characteristic in flash 5.0. Howevrer, I use pixel fonts and need to know how to make the movie clip move only on WHOLE pixels so the text never blurs even during movement. Can anybody help me with this?
this is the code (if it is even relevant):
onClipEvent (load) {
var valid = true;
newY = _y;
origY = _y;
Yspeed = 0;
a = 1.4;
d = 1.2;
}
onClipEvent (enterFrame) {
Yspeed = ((_y-newY)/a+Yspeed)/d;
_y -= Yspeed;
}
onClipEvent (mouseDown) {
if ((valid == true) and (_root._ymouse < 275)) {
newY = Math.ceil(_root._ymouse);
valid=false;
}else{
if ((valid == true) and (_root._ymouse > 275)) {
newY = 275;
valid=false;
}
}
}
-
onClipEvent (enterFrame) {
Yspeed = ((_y-newY)/a+Yspeed)/d;
_y -= math.ceil(Yspeed);
}
given that the initial position is a whole pixel...
-
Thank you very much for your help. I really feel better now.
-
Hey, a minimalist web link thingy. its about time.