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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refering to a movie clip instance thru a variable

Status
Not open for further replies.

spook007

Programmer
May 22, 2002
259
US
I have an xml file that contains names and properties of movie clips in my flash file. what data type do I use if I would like to load the name of the instance from the xml file so I can change the properties on the flash movie.

<mc>
<clip alpha="0" x="100" y = "25">mc_test1</clip>
<clip alpha="50" x="200" y ="25">mc_test2</clip>
<clip alpha="100" x ="300" y = "25">mc_test3</clip>
</mc>

Actionscript
.
.
.

for (var i:int = 0;i <xmlList.length();i++)
{
mc = new String(); //WHAT SHOULD THIS DATATYPE BE?

mc = xmlList;
mc.alpha = int(xmlList.attribute("alpha"));
}

Any suggestions would be appreciated... thx!
 
TypeError: Error #1009: Cannot access a property or method of a null object reference."

Is the error I get when i try var mc:MovieClip = this[xmlList];

I'm guessing it's erroring out when I make the mc.alpha = int[xmlList.attribute("alpha")); request.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top