Link to home
Start Free TrialLog in
Avatar of EMB01
EMB01Flag for United States of America

asked on

Easy AS3 Question Regarding For Loop

I have a movie clip instance in frame one named "s" and the following code in the same frame:

for (int i = 0; i < 10; i++) {
	s.x += 5;
}

Open in new window


I want to move the instance of "s" five pixels to the right every time the loop is done; basically trying to animate it as a simple intro to AS3.

I get an error that says "Scene 1, Layer 'Layer 1', Frame 1, Line 1      1084: Syntax error: expecting semicolon before i."
ASKER CERTIFIED SOLUTION
Avatar of dgofman
dgofman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of EMB01

ASKER

Great, thanks.