找回密码
 注册
广告投放 虚位以待【阿里云】2核2G云新老同享 99元/年,续费同价做网站就用糖果主机-sugarhosts.comJtti.com-新加坡服务器,美国服务器,香港服务器
查看: 744|回复: 14

帮我看看这段代码哪里不合理

[复制链接]
发表于 2006 年 5 月 13 日 09:23:57 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
onClipEvent (load) {
        max_h = 80;
        min_h = 67;
        de_h = 70;
        num_of_menu = 11;
        system_on = false;
        for (i=1; i<=num_of_menu+1; i++) {
                this.attachMovie("line", "line"+i, (100*i));
                this["line"+i]._x = (i-1)*de_h;
                this["line"+i]._y = 20;
                this["line"+i].active = false;
        }
        this.line1._visible = false;
        this.line13._visible = false;
        for (i=1; i<=num_of_menu; i++) {
                this.attachMovie("menu", "menu"+i, i);
                this["menu"+i]._x = (i-1)*de_h;
                this["menu"+i]._y = 0;
                this["menu"+i]._xscale = (this["line"+(i+1)]._x-this["line"+i]._x)/0.79;
                this["menu"+i]._xscale = (this["line"+(i+1)]._x-this["line"+i]._x)/0.79;
                // this["menu"+i].attachMovie("fade","fade",2);
                this["menu"+i].attachMovie("image"+i, "image", 1);
        }
        function targetCheck() {
                if (this._xmouse>=0 && this._xmouse<=760 && this._ymouse>=0 && this._ymouse<=70) {
                        system_on = true;
                        for (i=1; i<=num_of_menu; i++) {
                                if (this._xmouse>this["line"+i]._x && this._xmouse<this["line"+(i+1)]._x) {
                                        this["line"+(i+1)].active = true;
                                } else {
                                        this["line"+(i+1)].active = false;
                                }
                        }
                } else {
                        system_on = false;
                }
        }
        function lineMove() {
                if (system_on) {
                        for (i=2; i<=num_of_menu; i++) {
                                if (this["line"+i].active) {
                                        this["line"+i].targetPos = this["line"+(i-1)].targetPos+max_h;
                                } else {
                                        this["line"+i].targetPos = this["line"+(i-1)].targetPos+min_h;
                                }
                                this["line"+i]._x += (this["line"+i].targetPos-this["line"+i]._x)/13;
                        }
                } else {
                        for (i=2; i<=num_of_menu; i++) {
                                this.line1.targetPos = 0;
                                this["line"+i].targetPos = this["line"+(i-1)].targetPos+de_h;
                                this["line"+i]._x += (this["line"+i].targetPos-this["line"+i]._x)/13;
                        }
                }
        }
        function menuMove() {
                for (i=1; i<=num_of_menu; i++) {
                        if (system_on && this["line"+(i+1)].active) {
                        }
                        this["menu"+i]._x = this["line"+i]._x;
                        this["menu"+i]._xscale = (this["line"+(i+1)]._x-this["line"+i]._x)/0.79;
                        this["menu"+i]._yscale = (this["line"+(i+1)]._x-this["line"+i]._x)/0.79;
                }
        }
}
onClipEvent (enterFrame) {
        targetCheck();
        lineMove();
        menuMove();
}
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
 楼主| 发表于 2006 年 5 月 14 日 20:35:48 | 显示全部楼层
【腾讯云】2核2G云服务器新老同享 99元/年,续费同价
现在人多拉
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

发表于 2006 年 5 月 14 日 20:38:31 | 显示全部楼层
晕忽忽
那么多
不懂
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

 楼主| 发表于 2006 年 5 月 14 日 20:43:24 | 显示全部楼层
FLASH 脚本
循环有问题
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

发表于 2006 年 5 月 14 日 20:55:54 | 显示全部楼层
楼下的答。。。
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

 楼主| 发表于 2006 年 5 月 14 日 20:59:32 | 显示全部楼层
都不知道啊
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

发表于 2006 年 5 月 14 日 21:00:15 | 显示全部楼层
【腾讯云】2核2G云服务器新老同享 99元/年,续费同价
帮顶~
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

 楼主| 发表于 2006 年 5 月 14 日 21:06:57 | 显示全部楼层
都不知道?
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

发表于 2006 年 5 月 14 日 21:55:24 | 显示全部楼层
有什么错?语法上没问题,不过不知道你这是在干什么...
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

 楼主| 发表于 2006 年 5 月 14 日 21:57:45 | 显示全部楼层
CPU占用78%
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|金光论坛

GMT+8, 2025 年 2 月 2 日 16:37 , Processed in 0.119240 second(s), 21 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表