开发者

Flex Import Class from a Module within a sub directory

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 { ... })

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜