目标:
flash中的元件能在flex中完美使用,包括代码逻辑性,元件样子保留,数据导入等.......
问题:
flex中的架构,(举例uicomponent类的继承关系)
uicomponent > flexsprite> sprite >displayobjectcontainer>interactiveobject >displayobject
flash中的架构(sprite类的继承关系)
sprite >displayobjectcontainer>interactiveobject >displayobject
flex中的uimovieclip类继承于uicomponent ,flash中的movieclip继承于sprite,
flash中直接导出swc,swc中的元件属于movieclip,而在flex中确不能在现实对象中直接添加没有iuicomponent接口的类对象,so不能使用.
解决方法:
自己给swc写方法,实现iuicomponent接口中的方法,很麻烦,偶没做过,呵呵
或者使用官方提供插件,让flash自动编译movieclip为uimovieclip类,
根据黑羽大哥教材所讲:flex component kit for flash cs3工具
如对本文有疑问,
点击进行留言回复!!
网友评论