You can go into a class by ctrl-clicking in flex, I went into the
ObjectUtils class and grabbed the two functions you need.

public static function toString(value:Object,
                                    namespaceURIs:Array = null,
                                    exclude:Array = null):String
    {
        if (exclude == null)
        {
            exclude = defaultToStringExcludes;
        }

        refCount = 0;
        return internalToString(value, 0, null, namespaceURIs,
exclude);
    }

 private static function internalToString(value:Object,
                                             indent:int = 0,
                                             refs:Dictionary= null,
                                             namespaceURIs:Array =
null,
                                             exclude:Array =
null):String
    {
        var str:String;
        var type:String = value == null ? "null" : typeof(value);
        switch (type)
        {
            case "boolean":
            case "number":
            {
                return value.toString();
            }

            case "string":
            {
                return "\"" + value.toString() + "\"";
            }

            case "object":
            {
                if (value is Date)
                {
                    return value.toString();
                }
                else if (value is XMLNode)
                {
                    return value.toString();
                }
                else if (value is Class)
                {
                    return "(" + getQualifiedClassName(value) + ")";
                }
                else
                {
                    var classInfo:Object = getClassInfo(value,
exclude,
                        { includeReadOnly: true, uris:
namespaceURIs });

                    var properties:Array = classInfo.properties;

                    str = "(" + classInfo.name + ")";

                    // refs help us avoid circular reference infinite
recursion.
                    // Each time an object is encoumtered it is pushed
onto the
                    // refs stack so that we can determine if we have
visited
                    // this object already.
                    if (refs == null)
                        refs = new Dictionary(true);

                    // Check to be sure we haven't processed this
object before
                    var id:Object = refs[value];
                    if (id != null)
                    {
                        str += "#" + int(id);
                        return str;
                    }

                    if (value != null)
                    {
                        str += "#" + refCount.toString();
                        refs[value] = refCount;
                        refCount++;
                    }

                    var isArray:Boolean = value is Array;
                    var prop:*;
                    indent += 2;

                    // Print all of the variable values.
                    for (var j:int = 0; j < properties.length; j++)
                    {
                        str = newline(str, indent);
                        prop = properties[j];
                        if (isArray)
                            str += "[";
                        str += prop.toString();
                        if (isArray)
                            str += "] ";
                        else
                            str += " = ";
                        try
                        {
                            str += internalToString(
                                        value[prop], indent, refs,
namespaceURIs,
                                        exclude);
                        }
                        catch(e:Error)
                        {
                            // value[prop] can cause an RTE
                            // for certain properties of certain
objects.
                            // For example, accessing the properties
                            //   actionScriptVersion
                            //   childAllowsParent
                            //   frameRate
                            //   height
                            //   loader
                            //   parentAllowsChild
                            //   sameDomain
                            //   swfVersion
                            //   width
                            // of a Stage's loaderInfo causes
                            //   Error #2099: The loading object is
not
                            //   sufficiently loaded to provide this
information
                            // In this case, we simply output ? for
the value.
                            str += "?";
                        }
                    }
                    indent -= 2;
                    return str;
                }
                break;
            }

            case "xml":
            {
                return value.toString();
            }

            default:
            {
                return "(" + type + ")";
            }
        }

        return "(unknown)";
    }

Jonathan
ScribbleMaps.com

On Aug 27, 11:47 am, Consigliere <[email protected]> wrote:
> Is there something similar for Flash? I found that ObjectUtils is for
> Flex. I need to read the content of the GeocodingResponse Object in
> Flash CS4/5.
>
> Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API For Flash" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api-for-flash?hl=en.

Reply via email to