Try this,
coded in Outlook so may not work of the bat but should give you some idea.
loadVariables("file.txt", _root.mc);
prefix your mcs you want the variables to appear in with or whatever
and then:
var prefix = 'pre_';
var seedMC = _root.mc;
foreach( var mc in this )
{
if( mc._name.substr( 0,prefix.length ) == prefix )
{
foreach( var prop in seedMC )
{
if( prop.substr(0,1) != '_' )
{ // skip '_x', '_y', '_alpha' etc
mc[prop] = seedMC[prop];
}
}
}
}
It's always better to create a container property inside each mc to hold your
data - then you can iterate over that ans skip all the MovieClip class
properties which you want to ignore.
HTH
Stephen
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of MetaArt
Sent: 28 November 2005 10:51
To: Flashcoders mailing list
Subject: [Flashcoders] loading txt file in many mc
There is a way to laod, at the same time and with just one line code, a .txt
file content inside many mc on stage?
Without repeat "loadVariables("file.txt", _root.mc);" as much time as are
the mcs.
Enrico Tomaselli
+> web designer <+
[EMAIL PROTECTED]
http://www.metatad.it
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders