How to include an actionscript function from an external file in flex4/MXML/Spark?
问题 It turns out that’s it’s impossible to declare a class inside a embedded <fx:Script><![CDATA[ so it turns I need to put and include the actionscript code inside an external Sourcefile. The error is commented out <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="1955" minHeight="1600"> <fx:Script source="URLRequest.as" /> <s:layout> <s:BasicLayout /> </s