Global is bad and went directly against OOP.  To do it right, you want
your component to broadcast an event, and the other componet to listen
for that event and then call another method when the event is heard.
 

Jason Merrill 
Bank of America 
GT&O L&LD Solutions Design & Development 
eTools & Multimedia 

Bank of America Flash Platform Developer Community 


Are you a Bank of America associate interested in innovative learning
ideas and technologies?
Check out our internal  GT&O Innovative Learning Blog
<http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/default.aspx>
and & subscribe
<http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layouts/SubNew.a
spx?List=%7B41BD3FC9%2DBB07%2D4763%2DB3AB%2DA6C7C99C5B8D%7D&Source=http%
3A%2F%2Fsharepoint%2Ebankofamerica%2Ecom%2Fsites%2Fddc%2Frd%2Fblog%2FLis
ts%2FPosts%2FArchive%2Easpx> . 




 


________________________________

        From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of dsds99
        Sent: Friday, February 22, 2008 1:42 PM
        To: [email protected]
        Subject: [flexcoders] as3 global variables - no more
        
        

        Yes, using global variables was easy solution to referencing
        movieclips from anywhere.
        
        I'm trying to link up my play button to play the selected track
in a
        listbox. The two components are in separate classes.
        
        one solution is that in my main class I pass a reference of the
        listbox to my playbutton.
        
        Are there alternative solutions to this...Better OOP practice.
        
        

         

Reply via email to