对于flashdll,估计现在很多人都用了
发现FlashDLL--flash也有dll啦
发布你的资源文件(release your class resource)-Flash cs3篇
发布你的资源文件(release your class resource)-Flex篇
对于一个swf和swc的逻辑包,当然,运行时你可以去反射获取,但写代码时候去相当的郁闷
其实解决也很便捷,只要确保逻辑包的文档类是由一个定义好的接口派生的就好了,之后可以把获取的Class转成这个接口,这样分工完善会少去很多的麻烦,诸如:把api写错之类的问题
先上代码包吧
Using Interface to connect main application adn the logical lib.zip
代码包中
Tester.as是主程序类
ILib.as是接口
Lib.as是逻辑包文档类
lib.fla是逻辑包文件
----------------------------------------------------------------------------------------------------
For flashdll,maybe that's simple to us.
When loading a logical lib as swf or swc,reflection is a perfect way to use it.But I can view nothing about the logical lib when coding.So I code a interface to fix it.
Of course,it would be better when your coworker is in charge of the logical library and you code the main application,and you wouldn't make a mistake as coding the wrong name of the library API.
the code package:(I think you will find it)
Tester.as::main application class
ILib.as::of course,a interface
Lib.as::document class of the logical library
lib.fla::logical library file
Good Luck & Have Fun!