I'm having a problem with Flex 4 beta 2...
I can't call a class using: <fx:Script source:"myClass"/>
For some reason, no matter what I do, the error is always the same:
Packages cannot be nested
I found links to help.adobe.com
,开发者_如何学Python but they were all broken links.
So, is this a Flex bug or there is a new way to use external classes in Flash Builder 4?
i think you have to write: <fx:Script source="myClass"/> ( no colon but the equal sign .... )
... and myClass must be an actionScript file and not a class
Thanks NSP!
- I removed the package and class declarations from my .as file (along with the scope brackets '{' and '}).
- I used the '=' symbol as the assignment operator (as you suggested).
E.G.:
<fx:Script source="Greeter.as">
That did the trick.
精彩评论