Sunday, March 28, 2010

How can a class access a variable on a...

in my class I declare a linked movie clip:

a_mc = new LinkedMC ();

trace(a_mc.testString);

and on the time line of LinkedMC:

var testString = ''test string'';

but I can't access testString.?

any clues?

Thanks!

How can a class access a variable on a...

you're trying to access the variable before it's defined.?have your LinkedMC dispatch an event letting your know the variable has been defined and assign a listener to a_mc to detect that event.?in the listener function, use your trace() function.

How can a class access a variable on a...

duh, of course.

Thanks!

you're welcome.

No comments:

Post a Comment