Hi,

It's a scoping issue. Which has been discussed many many times on this list,
you might wanna do a search.
You can use the delegate class for example to fix this.

Greetz
Hans
 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of zikey Han
> Sent: Tuesday, February 21, 2006 8:47 AM
> To: Flashcoders mailing list
> Subject: Re: [Flashcoders] how to liesten XML onLoad Event?
> 
> The problem is that :
> In doc.onLoad function assigment , I want to transfer 
> function of showType witch is outside of onLoad assigment!
> But it can't work! It can't catch Varibles from outside of onLoad.
> doc.onLoad = function (ok)
>   {
>    trace(type_str+".........." );
>    if (ok)
>    {
>     var str = this.firstChild.childNodes;
>     len = str.length;
>     while (len --)
>     {
>      album_arr.push ({path : str [len].firstChild.nodeValue, 
> url : str [len].attributes.url, name : str [len].firstChild.name});
>     }
>     showType();
>    } else
>    {
>     throw new Error ("xml document is not found");
>    }
>   }
> }
> 
> --
> ?????,??????!
> http://www.flashpixy.com
> 

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to