I am modifing an existing application. I have the class file.
I am using <MX:SCRIPT> to reference the class object in the
Now i would like to assign the value from class file variable
to the data control.
The code of in the AS file referred in the script tag would
get inserted into the main AS file generated for the mxml file. You
can refer to any variable function in the AS source file directly
A clarification here: You cannot "include" a "class" file
using the mx:Script source="" declaration.
If you include an AS script file, it cannot be a class, but
must be simply script statements. If you try to include a class,
you will get errors about nested classes.
If you really have a class file you want to use, instantiate
it using an mxml tag, or the "new" keyword in AS. It becoames a
component, and you cannot directly access its scope from outside,
but will need to use standard data passing techniques.