现在的位置: 首页 > 综合 > 正文

Flash学习报告

2018年10月26日 ⁄ 综合 ⁄ 共 936字 ⁄ 字号 评论关闭
要完成一个多媒体交互网站,需要用到大量甚至乎全部都是Flash来完成,然后直接插入到Html即可。
一个Flash网站包括:首页、主页(导航栏、网络相册、下拉文本框)
4.20 11点56分
开启Flash学习仪式,以预载Loading为标志。
Action代码:
stop()
_root.createEmptyMovieClip("Loading_mc",_root.getNextHighestDepth())
Loading_mc.beginFill(0x5f6165)
Loading_mc.moveTo(0,10);
Loading_mc.lineTo(0,0);
Loading_mc.lineTo(350,0);
Loading_mc.lineTo(350,10);
Loading_mc.lineTo(0,10);
Loading_mc._x=200
Loading_mc._y=350
_root.createTextField("Loading_txt",_root.getNextHighestDepth(),200,370,30,20)
Loading_txt.border=false
Loading_txt.multiline=true
Loading_txt.wordWrap=true;
Loading_mc.onEnterFrame=function(){
if(_root.getBytesLoaded()>=_root.getBytesTotal()){
  _root.play()
  _root.Loading_mc.removeMovieClip()
  _root.Loading_txt.removeTextField()
}else{
  _root.Loading_mc._xscale=(_root.getBytesLoaded()/_root.getBytesTotal())*100
  _root.Loading_txt.text=int(Loading_mc._xscale).toString()+"%"
  _root.Loading_txt._x=Loading_mc._width+200
}
}
只要把这段代码放在第一帧即可。
按2次Ctrl+Enter测试。

抱歉!评论已关闭.