湘教在线

当前位置:首页>课件专栏>网页设计>正文

在Director中应用Flash——从Director到Flash

√湘教在线   点击次数:  来源:[2006-10-14 20:24:51] 进入论坛
   说完了Flash 控制Director, 轮到Director来控制导入的Flash了, 在Director里, 你主要要学习控制Flash 的播放, 以Flash 文件本身的一些属性, 如缩放, 旋转等, 如果导入的是Flash 4格式的文件, 使用了GetProperty , SetProperty 等版本3没有的Actionscript, Director可以进一步来获取Flash 里
MovieClip的属性, 从而使得这两者之间的整合再上一层楼, 不过这部分内容已超出基础篇的范围, 以后有机会单独讲解。这里主要使用一些最基本的功能。 

1. 正常播放(Playing) 

    Sprite(whichFlashSprite).play() 

    这里使用Director 7 and 8 所使用的dot syntax. 括号里的whichFlashSprite, 你替换成相应的Flash 所在的通道号就可以了。如果Flash sprite目前是暂停的, play 指令将会使Flash sprite 从所停止的那一帧开始播放, 而不是从头播放。 

2. 步进与步退(Stepping frame by frame) 

    Sprite(whichFlashSprite).frame = sprite(whichFlashSprite).frame + 1 或者 Sprite(whichFlashSprite).frame = sprite(whichFlashSprite).frame - 1 

    这也比较容易理解, 结合 mouseUp 事件你就可以一帧一帧的步进或步退。 

3. 倒退回第一帧(Rewinding) 

Sprite(whichFlashSprite).rewind() 

4. 停止(Stopping) 

    Sprite(whichFlashSprite).stop() 这时Flash会停止在当前的帧上。而不是返回第一帧。 或者 Sprite(whichFlashSprite).hold() 同样Flash会停止在当前的帧上, 不过如果Flash 里有声音文件, 声音部分不受影响, 继续播放。 

分类信息
湘教在线,更多精彩在首页,
湘ICP备05003666号 - 给湘教在线提意见
网站介绍 - 广告服务 - 联系我们 - 网站导航 - 黄金会员 - 服务承诺 - 诚聘高手 -
湘教在线版权所有
©2003-2008