How can we see Object values in as3

var obj:Object = {title:”Flex Debugging”, pages:100};

trace(“obj : “+obj);// [Object Object]

trace(“Printing object: “+ObjectUtil.toString(obj));//
(or)

var myObject:Object = {firstName:”Tara”, age:27, city:”San Francisco”};
for (var prop in myObject) {
trace(“myObject.”+prop+” = “+myObject[prop]);
}
/*
myObject.firstName = Tara
myObject.age = 27
myObject.city = San Francisco
*/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s