Declare the variable in the "instance" scope, that is, not inside a
function.  That will make it available anywhere within the class
instance.  In non-OO terms, you might call it a "global" variable, but
it is not really global, only global to the class instance, hence the
term "instance" variable.

 

Tracy

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of wild.katana
Sent: Wednesday, May 21, 2008 4:53 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: How do I use URLLoader?

 

Do you mean something like this:
public var myLoader:URLLoader = new URLLoader(myXMLURL);
I tried it but it didn't work... What do you mean by instance variable?

--- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> myLoader needs to be an instance variable instead of a local one.
> 
> 
> 
> Maybe the sencond will go away when the xmlLoaded function can
compile.
> 
> 
> 
> Consider HTTPService instead, it is a bit simpler to use.
> 
> 
> 
> Tracy
> 
> 

 

Reply via email to