Use a for-in loop rather than a for-each-in loop:

 

for (var prop:String in myObject)

{

    trace(prop, myObject[prop]);

}

 

Gordon Smith

Adobe Flex SDK Team

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of timgerr
Sent: Tuesday, May 06, 2008 10:27 PM
To: [email protected]
Subject: [flexcoders] For each in an object

 

I have this object and I am not sure what is in it. So I do this 
for each (var somthing:String in myObject){
trace(somhting);
}

So with this I get all the object answers. I want to get what is
referecing the object answers, in PHP I can do this.
foreach ($somthing as $service => $myObject){
echo $somthing . " " . $services . "<br/>";
}

I want to print out what is pointing to the values, can this be done
in flex?

Thanks,
timgerr

 

Reply via email to