You need to use classes and put your logic there, just leave the use of the script tags to control the UI and communicate with the logic.
I think it's time for you to introduce yourself to the concepts of Object-oriented design and class-based development. It'll be worth it, but the foothils are a little steep at first. Paul ----- Original Message ----- From: Leonardo To: [email protected] Sent: Friday, May 16, 2008 12:12 AM Subject: [flexcoders] logic code in another file hello, usually when i'm doing a regular web application i have my html document, a small piece of javascript where i instantiate my general-purpose javascript objects and finally my especialists-objects. How can i do it with Flex? using the <mx:Script> tag i can add some logic and do direct access on the widgets. But what i really need is to separate the script from the rest, so interface and logic could be well managed.

