即拷即用的loading代码 |
| [来源:flashxm.com | 作者:向明 | 时间:2008-04-03 | 点击: | 收藏本文 【大 中 小】] |
|
- // 设置loading的宽、高、颜色
- var loading_width = 200;
- var loading_height = 3;
- var loading_color = 0x000099;
- var rect1 = createRectangle(this, loading_width, loading_height, loading_color, true);
- var rect2 = createRectangle(this, loading_width, loading_height, loading_color, false);
- rect1._x = (Stage.width - loading_width) / 2;
- rect1._y = (Stage.height - loading_height) / 2;
- rect2._x = rect1._x;
- rect2._y = rect1._y;
- this.onEnterFrame = function ()
- {
- rect1._width = _root.getBytesLoaded() / _root.getBytesTotal() * loading_width;
- if (_root.getBytesLoaded() == _root.getBytesTotal()) {
- rect1.removeMovieClip();
- rect2.removeMovieClip();
- delete rect1;
- delete rect2;
- delete this.onEnterFrame;
|
| 上一页12 下一页 |
| 文章如果有错误或者缺少文件,请发邮件提交给我们 |
|
|
|
|
|
|
|
| >>> 最新评论:(共有 0 位网友发表了评论) 查看所有评论 |
|
|
| 发表评论 |
|
| ·本站发布内容均为客观表达作者观点,不代表闪无忧立场,请勿攻击和漫骂 |
| ·用户发表意见仅代表其个人意见,并且承担一切因发表内容引起的纠纷和责任 |
| ·本站管理人员有权在不通知用户的情况下删除不符合规定的评论信息或留做证据 |
| ·请客观的评价您所看到的资讯,提倡就事论事,杜绝漫骂和人身攻击等不文明行为 |
|