Flash CS3 组件开发教程

2007-06-20 10:01:51 来源: 蓝色理想(长沙) 网友评论 0 进入论坛

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

screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0>

screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0>

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

screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0>

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

screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0>

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 组件开发完成了!


FLASH高级编程视频教程

Flash CS3之动画教程

独家:Flash ActionScript视频教程

学习更多知识与技巧 请点击 网易学院梅义

本文来源:蓝色理想
我来评两句
我的灌水记录
匿名发表
tech
精彩推荐

今日网易科技看点


39健康网_中国第一健康门户网站
商业推荐

排行榜

今日网易财经看点


主编信箱 热线:020-85105316 给网易提意见 
About NetEase - 公司简介 - 联系方法 - 招聘信息 - 客户服务 - 相关法律 - 网络营销
网易公司版权所有
©1997-2008