Where does code within Script tags go in the resulting AS class?
        Posted  
        
            by Hanno Fietz
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Hanno Fietz
        
        
        
        Published on 2010-05-25T11:37:37Z
        Indexed on 
            2010/05/25
            11:41 UTC
        
        
        Read the original article
        Hit count: 179
        
I was wondering what happens to the code contained in an <mx:Script> tag. If I define a function tehre, it just becomes a member function of the generated class. But I noticed that it seems OK for the compiler if I just write some (static) method calls there (specifically, I call Font.registerFont()). I feel kind of guilty for doing this, because I have no idea what's really happening and when the code gets executed.
© Stack Overflow or respective owner