源码资源
 
Photoshop
 
     

即拷即用的loading代码
加入日期: 2006-3-22     关键字: flash,loading
文章来源: 沐风经典     文章作者: 佚名     责任编辑: 第七乐章
添加收藏夹    打印此页    关闭窗口
  收藏此页到  365Key网摘  天极网摘  博采文摘  和讯网摘  人人网摘

    放在第1帧即可。enjoy!

stop();
var rect1:MovieClip = createRectangle1(150, 3, 0x000000);
var rect2:MovieClip = createRectangle2(152, 5, 0x000000);
rect1._x = (Stage.width - rect1._width) / 2;
rect1._y = (Stage.height - rect1._height) / 2;
rect2._x = (Stage.width - rect2._width) / 2;
rect2._y = (Stage.height - rect2._height) / 2;
onEnterFrame = function () {
rect1._width = _root.getBytesLoaded() / _root.getBytesTotal() * 150;
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
rect1.removeMovieClip();
rect2.removeMovieClip();
delete rect1;
delete rect2;
delete createRectangle1;
delete createRectangle2;
delete onEnterFrame;
play();
}
};
function createRectangle1(width:Number, height:Number, color:Number, scope:MovieClip):MovieClip {
scope = (scope == undefined) ? this : scope;
var depth:Number = scope.getNextHighestDepth();
var mc:MovieClip = scope.createEmptyMovieClip("mc_" + depth, depth);
mc.beginFill(color);
mc.lineTo(0, height);
mc.lineTo(width, height);
mc.lineTo(width, 0);
mc.lineTo(0, 0);
return mc;
}
function createRectangle2(width:Number, height:Number, color:Number, scope:MovieClip):MovieClip {
scope = (scope == undefined) ? this : scope;
var depth:Number = scope.getNextHighestDepth();
var mc:MovieClip = scope.createEmptyMovieClip("mc_" + depth, depth);
mc.lineStyle(color);
mc.moveTo(0, 0);
mc.lineTo(0, height);
mc.lineTo(width, height);
mc.lineTo(width, 0);
mc.lineTo(0, 0);
return mc;
}


Google搜索 本站


站内搜索:
 





相关文章:
快速导航
 

[VB编程]

系统控制 窗口界面 网络应用 文件操作 图形方面 字符串 多媒体 数据库 其他方面 游戏编写
[网页制作]
制作技巧 建站理念 新手上路 高级应用 ASP技术
[Flash制作教程]
Flash制作
[资源下载]
VB源码下载 建站资源 Flash源码
[沐风软件]
沐风网页三叉戟 下载 注册
  FlashRun 下载 注册
[沐风服务]
域名注册 主机空间 建站服务

关于我们 |  项目合作 | 版权声明  |  | 
闽ICP备05001148号
本站为非盈利性质网站,所开展的一些业务旨在维持网站运转。主机租用、域名注册服务由亿讯网络提供。
沐风经典网友交流群:7738284
©2005 沐风工作室™. 版权所有