Hi,

can you reproduce the problem and put up some fla for download for us to
test?

greetz
JC

On Fri, Jan 30, 2009 at 10:07 PM, Matt McKeon <[email protected]> wrote:

> Hi all,
>
> I've got some code in AS2, and a function that has one parameter of type
> Object. That function gets called from a callback function from an
> event; basically its just passing along the object.
>
> The crazy thing is in the callback function I can loop through the
> object parameter and see all the properties and values, but in the other
> function looping through the object only displays the property names and
> *not* the values (values all say "undefined"). Very bizarre.
>
> // in class A
> // this is the callback for an event
> // say o is the object:
> var o:Object = {}
> o.param1 = 'val1';
> o.param2 = 'val2';
>
> public function onObjectReceivedHandler(o:Object) : Void  {
>    // this prints the object with all values
>    for(var d in o) {
>        trace(d + " :: " + o[d]);
>    }
>
>    mc.classb.testobjectparam(o);
>    }
> }
>
> // in class B
> public function testobjectparam(myobj:Object) : Void {
>    // this only prints the property name, no value
>    for(var d in myobj) {
>        trace(d + " :: " + myobj[d]);
>    }
> }
>
> Both classes extend MovieClip and are in separate SWF's. So class B is
> in a dynamically loaded SWF if that makes any difference.
>
> Has anyone seem something like this happen? I'm hitting my head here and
> not sure what to try next. Any advice would be great!
>
> Thanks.
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to