Hi,

 

As a side note, you might try to place your .AS file in the root directory 
(along with your main .MXML application file) and define all the necessary 
methods there. The methods should be all public though but the advantage is 
that you are not even required to define a package. Methods shouldn't be even 
static.

 

Cheers,

Petro

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Andre 
Rodrigues Pena
Sent: Monday, March 26, 2007 11:50 PM
To: [email protected]
Subject: [flexcoders] Global access in AS3

 

Hi all,

My problem is: I need some data classes to be global so that I can
access them without to have to establish unnecessary references.

I tried to create a Singleton class the way we're used to do in Java,
and I got 2 problems:

1) It's not possible to define a private constructor
2) The instance created in the getInstance() method is not keeping the
data, I don't know why

What do I do to have globally accessible structures in AS3?

-- 
André Rodrigues Pena

LOCUS
www.locus.com.br

Blog
www.techbreak.org

 

Reply via email to