I am using _global variables throught my FLAs, probably because I haven't really
been exposed to the negatives of using them, thus not really knowing any 
I am interested in conforming to better 'design' standards and am familiar with
the Singleton Design Pattern. Any chance you could provide an example of how 
variables might be stored in a class for retrieval and a later time.


Nathan Derksen nderksen at sfu.ca wrote:
>I generally keep at least one singleton class which is responsible  
>for storing global properties. I make those properties accessible  
>with getters and setters so that I can allow changes in those  
>properties to trigger events. You can't really do that if you use  
>_global to store your data. Also, there is always a risk in name  
>space collision if you load in other elements that also use global,  
>where one or more variables use the same name and are thus  
>inadvertently shared for different uses. You definitely do not want  
>to use _global within any classes that you create, as that can cause  
>entanglement, gives you no private protection, and does not properly  
>contain your code into a well-defined unit with a well-defined API.

Flashcoders mailing list

Reply via email to