7.接下来开始定义组件了,设置Class 类路径、提示信息等选项。再点击组件图标选择之前png 图片。



8.如果图标不能像下图所示的话,请按第4步重新确认一下就可以了。

9.然后就是把这个StringUtil 组件打包成SWC 文件(其实就是一个zip 压缩文件格式)。

10.到第9步组件就算做成功了,但要发布给别人用的话,就可以把swc 文件打包成mxp 文件了,而打包之前首先要配置StringUtil.mxi 文件(这个文件就是xml 文件格式),内容如下:
<macromedia-extension name="StringUtil" version="1.0" type="Flash component"> <!-- Describe the author --> <author name="Kinglong" /> <!-- List the required/compatible products --> <products> <product name="Flash" version="9" primary="true" /> </products> <!-- Describe the extension --> <description> <![CDATA[ StringUtil类<br> 有关String工具类。 ]]> </description> <!-- Describe where the extension shows in the UI of the product --> <ui-access> <![CDATA[ This StringUtil Component is accessed by choosing Window > Components > StringUtil. ]]> </ui-access> <!-- Describe the files that comprise the extension --> <files> <file name="StringUtil.swc" destination="$flash/Components" /> </files> </macromedia-extension>
官方提供有关mxi 文件格式说明:mxi_file_format.pdf
11.如果你已经安装了 Adobe Extension Manager 1.8 扩展管理器的话,你可以直接双击StringUtil.mxi 文件来生成StringUtil.mxp 文件。或者你先打开 Adobe Extension Manager 1.8 扩展管理器选择“文件”-“将扩展打包...”,选择StringUtil.mxi 文件,然后生成StringUtil.mxp,到这里就贺喜你了,你的Flash CS3 组件开发完成了!
经典论坛讨论: http://bbs.blueidea.com/thread-2758660-1-1.html
本文链接:http://www.blueidea.com/tech/multimedia/2007/4772.asp
出处:蓝色理想
责任编辑:elesa
上一页 Flash CS3 组件开发教程 [1] 下一页
◎进入论坛Flash专栏版块参加讨论
|