Never had to move text across stage any ideas?
Moving dynamically generated text fields across stage from one point to another decrementing by -=1 each call time. Once the first gets to a certain point on stage I add another one, think “News Feeder”. This continues until the last is added and then starts all over again. I have everything working fine and dandy however;
There is a stutter whether I add a event.enter_frame individually to each or as a whole and push each text field into an array and move them via a for loop. I have tried rewritting this thing about 30 times now all with different amounts of stuttering whether I have a timer or enter frame event.
My question is;
Has anyone tried this and what methods did you use when actually moving the items?
Here is how I am going about it:
actMover is the function getting called whether from timer or enter frame event. Hit me with ideas. Thanks in advance.
MT
public function actMover (event:Event):void {
for(var i:int=0;i<moveItemsArr.length;i++) {
var bitmap:Bitmap = moveItemsArr*;
moveIt(bitmap);
};
};
public function moveIt(bitmap:Bitmap):void {
if(bitmap) {
bitmap.x-=speed;
};
rightEdge = stageWidth - bitmap.width;
if (bitmap.x == rightEdge) {
///Adds another one
whereWeAt();
};
if(bitmap.x < leftEdge) {
//Removes past one
moveItemsArr.splice(0,1);
this.removeChild(bitmap);
bitmap = null;
};
};