[FONT="]I’ve got a situation where I have to pause a movement of a movie clip(bug) in-between getting different values from an array which tells the movie clip which new direction to go. All this happens after pressing the go button to initialise the first movement. I have tried to use setInterval and get timer to put pauses in, but it either stops after the first instruction and goes through the entire array sequence and then stops. The basic code is posted below. Can somebody help me with the direction I need to go in? I can only use actionscript code to move the bug. Thanks
on (release) {
for (var i =0;i < itemArray.length; i++) {
program = itemArray*;
if (program == "Up") {
currenty = bug._y;
bug._rotation = 0;
bug._y = bug._y-50;}
else if (program == "Down") {
currenty = bug._y;
bug._y = bug._y+50;
bug._rotation = 180;}
else if (program == "Left") {
currentX = bug._x;
bug._x = currentX-50;
bug._rotation = 270;}
else if (program == "Right") {
currentX = bug._x;
bug._x = currentX+50;
bug._rotation = 90;}
trace(itemArray*);
}
trace (itemArray.length);
}
[/FONT]