I put some modules in a module folder. How do I import classes with the import statement when I'm in a sub folder?
This won't work, not like classes which are in packages.
modules/SomeModule.mxml<?xml version="1.0"?>
<mx:Module>
<mx:Script>
<![CDATA[
import Fruit.Apple;
]]>
</mx:Script>
</mx:Module>
Directory:
开发者_运维知识库. |-- Fruit |-- Apple.as |-- Modules |-- SomeModule.mxml `-- application.mxml
This should work as long as the src folder is set to the above directory and the Apple class has the correct package declaration (package Fruit { ... }
)
精彩评论