dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: [RESOLVED] Trace all properties of an Object

  1. #1
    Member
    Join Date
    Apr 2008
    Posts
    97

    resolved [RESOLVED] Trace all properties of an Object

    Does anyone know how to trace all properties of an Object regardless of data type?

  2. #2
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    This will give you more info than you ever wanted about an object:

    trace( describeType( obj ) );

  3. #3
    Total Universe Mod jAQUAN's Avatar
    Join Date
    Jul 2000
    Location
    Honolulu
    Posts
    2,429
    use a for.. in loop

    PHP Code:
    for(prop in object){
    trace(prop+" is "+object[prop]);


  4. #4
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    Use both. for..in only iterates over the dynamic properties, and describeType only tells you the fixed public properties.

  5. #5
    absolutezero3424
    Join Date
    Nov 2006
    Posts
    508
    maybe I'm missing something, but it seems like "describeType" is not of much use because it doesn't seem to output the respective values of the properties and methods for an Object??? again, maybe I'm missing something...anyone care to clarify?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center