What is the error you're getting?
Maybe add a trace statement in there to see where it's breaking. You
could be trying to set a property that exists only in "obj" but not in
"a_sprite".
for ( var i in obj ) {
trace (i + " = " + obj[i]);
a_sprite[i] = obj[i];
}
-- James
James O'Reilly — Consultant
Adobe Certified Flash Expert
http://www.jamesor.com
Design • Code • Train
Karim Beyrouti wrote:
Hi List,
I am trying to add values to properties a classes, the classes properties
are defined like this:
function get isActive():Boolean{ return _isActive; }
function set isActive( val:Boolean):Void{ _isActive= val; }
so instead of douing this to add values to the class:
if ( obj.isActive!= undefined ) myClass.isActive = obj.isActive
I am trying to do something like this ( as I have quite a lot of properties
/ different classes ):
for ( var i in obj ) {
a_sprite[i] = obj[i]
}
But no joy... and well... has anyone been there with this one.?...
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com