///pc/img/blank.gif" width="12" height="8" border="0">当前位置:///default.htm" class="under">亿度网络 -> ///pc/index.htm" class="under">网页制作教程 -> Flash实例


/pc/bin/msg.pl?file_id=k_flashjq22 target="_blank">///pc/img/message.gif" width="64" height="54" alt="请您留言" border="0">
谈谈您的看法

///pc/img/blank.gif" width="1" height="1" border="0">
22.残影效果

预览成品:圆形球体由左往右滚动,其后产生残影效果。

///pc/homepage/flashsl/flash22/swf/duplic.zip">下载源程序


逐步说明:
  1、制作圆球滚动效果:新增影片片段motion,制作出圆球由左往右滚动并放大的渐变效果,然后设定第一帧和最后一帧的Actions为停止。

///pc/homepage/flashsl/flash22/img/001.gif" width="430" height="143" alt="制作影片片段motion">

  2、制作电影场景:新建图层motion,从图符资料库中拉入影片片段motion,并定义其实体名称为motion。

///pc/homepage/flashsl/flash22/img/003.gif" width="241" height="158" alt="拉入影片片段">

///pc/homepage/flashsl/flash22/img/002.gif" width="385" height="165" alt="定义实体名字">

  3、设定Actions:新建图层action,此范例共用到三个关键帧。

///pc/homepage/flashsl/flash22/img/004.gif" width="241" height="173" alt="新建图层action">

  第1个关键影帧设定的Actions为:
Set Variable: "i" = "10"
Set Variable: "n" = i
Loop While (i>0)
 Duplicate Movie Clip ("/motion", "motion"&i, i)
 Set Property ("motion"&i, Alpha) = i * 10
 Set Variable: "i" = i-1
End Loop
Set Property ("/motion", Visibility) = "0"
  解释:变量i是所要复制影片的数目,变量n也是计数值,待会在影帧回路里会使用到。在循环(Loop)里会重复执行i(10)次,每次都复制一个影片片段,实体名字各为:motion1、motion2至motion10,各设定其Alpha值i乘10,如此就可以得到10个不同实体名称又不同Alpha值的影片片段。设定原本的影片片段motion为不可见。
   第2个关键帧的Actions为:
If (n > 0)
 Begin Tell Target ("motion" & n)
  Play
 End Tell Target
End If
Set Variable: "n" = n-1
  第4个关键帧的Actions为:
If (n > 0)
 Go to and Play (2)
Else
 Stop End If
  解释:第2个关键影帧到第4个关键影帧是一段影帧回路,一共播放10次,每一次都告知一个复制的影片片段播放。


上一实例(位置渐变)  下一实例(搜寻关键字数)

/pc/bin/msg.pl?file_id=k_flashjq22 target="_blank">///pc/img/message.gif" width="64" height="54" alt="请您留言" border="0">
谈谈您的看法

 

网页制作 网页设计 网站建设 网站设计 网站制作 做网站 做网页