First off, I am not an animator.
I am trying to create a feeder of sorts. I have tried different fps on publishing but always get the stutter no matter the speed. There are only 4 - 5 items in moveItemsArr and on screen at any given time. Here is my mover function that gets called via a timer:
private function actMover (event:TimerEvent):void {
moveItemsArrL = moveItemsArr.length-1;
for (var j:int = moveItemsArrL; j>=0; j--) {
var currBit:Bitmap = moveItemsArr[j];
currBit.x -= speed;
if (currBit.x<(-currBit.width)) {
stage.removeChild(currBit); ///Removes instance that is past stage view
moveItemsArr.splice(j, 1);
}
var someOtherNum:Number = currBit.x + currBit.width * 2;
if (someOtherNum == stageWidth) {
whereWeAt(); ///Adds another instance to stage at specific location
}
}
};
////Timer stuff
private static const FRAME_RATE:int = 30;
private var _period:Number = 1000 / FRAME_RATE;
timer=new Timer(_period);
timer.addEventListener(TimerEvent.TIMER, actMover);
timer.start();
Why do I get a stutter? How to achieve fluid movement? I am lost?
-MT