[mtasc] Dynamic variables?
Robert Penner
info at robertpenner.com
Tue Sep 6 05:27:49 CEST 2005
_root.tester.textvar = 12;
_root.tfCaption.text = _root.tester.testvar;
You got a typo. Tilt your head slightly, cross your eyes and it should all
become clear.
Robert
-----Original Message-----
From: mtasc-bounces at lists.motion-twin.com
[mailto:mtasc-bounces at lists.motion-twin.com]On Behalf Of
stuff at trackingsolutions.ca
Sent: Monday, September 05, 2005 7:23 PM
To: MotionTwin ActionScript2 Compiler List
Subject: [mtasc] Dynamic variables?
I need to create thumbnails for a gallery and when you click the thumbnails
they load the main content according to the thumbnail clicked. I am loading
the content for the gallery from an XML file. The file is now loaded into an
array. I am now trying to assign variables to each movie clip to reference
the thumbnail pressed. I have not been successfull in creating these
variables from examles of actionscript from the web. Can someone help me to
assign these variables so that I can populate my gallery?
Example code:
var tester = _root.createEmptyMovieClip("tester",2000);
_root.tester.textvar = 12;
_root.tfCaption.text = _root.tester.testvar;
This outputs undefined as the value of the variable. How would I define this
in MTASC?
Thanks
--
MTASC : no more coffee break while compiling
More information about the mtasc
mailing list