中国站长助手 - 源码狐 www.web162.com
站点首页
┋
站长教程
┋
站长下载
┋
域名空间
┋
视频教程
┋
稀饭论坛
┋
素材之家
┋
设为首页
收藏本站
网页模板
┆
源码下载
┆
工具软件
┆
Flash源码
┆
字体下载
┆
矢量图库
┆
服务器类
┆
WAP 下载
┆
安全相关
┆
编程开发
┆
图片素材
┆
网页动画素材
网页制作
┆
网络编程
┆
平面设计
┆
Flash教程
┆
操作系统
┆
服 务 器
┆
媒体动画
┆
新闻资讯
┆
站长教程
┆
网络安全
┆
网页特效
┆
计算机类考试
ASP 源码
┆
PHP 源码
┆
JSP 源码
┆
asp.net源码
┆
C源程序
┆
VC源代码
┆
VB源代码
┆
网页编辑
┆
编程工具
┆
商业模板
┆
Web服务器
┆
Ftp服务器
栏目导航
·
问答专栏
·
初级操作
·
Action应用
·
实例教学
·
经验技巧
·
文字效果
·
特殊效果
·
特别应用
·
辅助软件
热门教程
·
[图文]
百度photoshop贴吧P...
·
破解qq相册密码
·
[组图]
制作一个逼真的垃圾...
·
qq空间背景音乐代码...
·
如何组建局域网
·
[图文]
网页图片特效代码-飘...
·
网页背景特效代码-星...
·
[图文]
网站流量统计代码
·
qq空间背景代码
·
[组图]
跟我一起用Photosho...
相关教程
站长教程
->
Flash教程
->
Action应用
-> 教程信息
即拷即用的loading代码 [
收藏本页
]
作者:xiangming 来源:闪吧 发布时间:2006-5-14 13:28:31
放在第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;
}
[] [
返回上一页
] [
打 印
] [
收 藏
]
上一篇教程:
最常用的Flash语句
下一篇教程:
浅谈设计中的文字
关于我们
┋
发展历程
┋
站点优势
┋
联系我们
┋
版本信息
┋
网页报错
┋
我有建议
┋
举报软件
Copyright © 2003-2008
站长
助手
www.web162.com
辽ICP备05001760号
网络实名:
站长
助手
转载本站原创教程请注名来源于本站
力倡站长资源文化,崇尚互联共享,做中国最好站长网站,为中国网站提供动力!
始建于2003-3-1 8:10 中国首都·北京 辽宁(分站)
主资源渠道辽宁电信分公司服务器组及带宽!