Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dynamic rotation loop

Status
Not open for further replies.

lucidtech

IS-IT--Management
Jan 17, 2005
267
US
I am trying to loop through a conditional and rotate movie clips dynamically. My code (that doesn't work) is the following :

function getData_Result(result) {
_root.relations_ds.dataProvider = result;
angelDiv = Number(360/_root.relations_ds.dataProvider.length);
for (g=0; g<_root.relations_ds.length; g++) {
toRotate = String(Number(angelDiv * g));
eval("_root.stem"+g+"_mc._rotation = '120'");
}
}

The problem is with the eval function.. doesn't rotate anything. I'm sure this is just a syntax error, but I can't figure out how to get it to work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top