Hi:
Okay, I edited out all of my confusing commentary
Can somebody please analyze the script below, and tell me why it runs choppy???
It appears that it is too processor intensive at times, but I don't understand why that is.
Actions on the clip:
onClipEvent (load) {
_x=0;
_y=150;
speed=0;
targetSpeed=0;
}
onClipEvent (enterFrame) {
_x+=Math.round(speed/3);
if (speed < targetSpeed) {
speed+=Math.round(10/8);
}else if (speed > targetSpeed) {
speed-=Math.round(10/8);
}
if (_x < 0) {
_x=762;
}else if (_x > 762){
_x=0;
}
}
Actions on the invisible hotspots/buttons [4 in all, each with different values]:
on (rollOver) {
_root.image1.targetSpeed=25;
}
on (rollOut) {
_root.image1.targetSpeed=0;
}
Here is an example [no preloader, but only 55k]:
http://www.ekigroup.com/360/hudsonPano.html
BTW, if I just use a simple _x+=15, etc., there is no choppyness. The frame rate is 24fps.
Thanks,
James
He is risen!!!



Reply With Quote
