主题:  Authorware的乐趣!

未来高手

职务:普通成员
等级:1
金币:0.0
发贴:9
#12004/3/22 19:00:00
[font=楷体_GB2312][/font][color=Red][/color]
我是一个初学者,但是在一开始我就感觉的他的乐趣,如果有愿意和我一起研究的,就给我回贴联系呀!
一起探讨!



与人同乐

职务:管理员
等级:6
金币:18.0
发贴:3928
#22004/3/22 21:24:08
来这里的大多是AW的爱好者。欢迎常来,和朋友们交流心得体会,提出自己的问题,也帮助别人解决些问题



myclap

职务:普通成员
等级:1
金币:0.0
发贴:17
#32004/3/22 21:42:36
我愿意和你一起研究研究,你有时间给我研究研究这段代码吧!
on (release) {
    if (a<0 || b<0 || c<0 || d<0 || isNan(a) || isNan(b) || isNan(c) || isNan(d)) {
        _root.result.result = "请输入正确的数字";
    } else {
        a = Number(a);
        b = Number(b);
        c = Number(c);
        d = Number(d);
        var arr = new Array();
        arr[0] = new Array(a, b, c, d);
        arr[1] = new Array(a, b, d, c);
        arr[2] = new Array(a, c, b, d);
        arr[3] = new Array(a, c, d, b);
        arr[4] = new Array(a, d, b, c);
        arr[5] = new Array(a, d, c, b);
        arr[6] = new Array(b, a, c, d);
        arr[7] = new Array(b, a, d, c);
        arr[8] = new Array(b, c, a, d);
        arr[9] = new Array(b, c, d, a);
        arr[10] = new Array(b, d, a, c);
        arr[11] = new Array(b, d, c, a);
        arr[12] = new Array(c, a, b, d);
        arr[13] = new Array(c, a, d, b);
        arr[14] = new Array(c, b, a, d);
        arr[15] = new Array(c, b, d, a);
        arr[16] = new Array(c, d, a, b);
        arr[17] = new Array(c, d, b, a);
        arr[18] = new Array(d, a, b, c);
        arr[19] = new Array(d, a, c, b);
        arr[20] = new Array(d, b, a, c);
        arr[21] = new Array(d, b, c, a);
        arr[22] = new Array(d, c, a, b);
        arr[23] = new Array(d, c, b, a);
        var arr_b = new Array(4);
        var flag = false;
        for (i=0; i<24; i++) {
            arr_b[0] = arr[i][0];
            arr_b[1] = arr[i][1];
            arr_b[2] = arr[i][2];
            arr_b[3] = arr[i][3];
            for (x=0; x<6; x++) {
                for (y=0; y<6; y++) {
                    for (z=0; z<6; z++) {
                        if (cacu(cacu(cacu(arr_b[0], arr_b[1], x), arr_b[2], y), arr_b[3], z) == 24) {
                            getResult(arr_b, x, y, z, 1);
                            flag = true;
                            break;
                        }
                        if (cacu(cacu(arr_b[0], arr_b[1], x), cacu(arr_b[2], arr_b[3], z), y) == 24) {
                            getResult(arr_b, x, y, z, 2);
                            flag = true;
                            break;
                        }
                    }
                    if (flag == true) {
                        break;
                    }
                }
                if (flag == true) {
                    break;
                }
            }
        }
        if (flag == false) {
            _root.result.result = "不能得到结果";
        }
    }
    function cacu(a, b, o) {
        switch (o) {
        case 0 :
            return a+b;
        case 1 :
            return a-b;
        case 2 :
            return b-a;
        case 3 :
            return a*b;
        case 4 :
            return a/b;
        default :
            return b/a;
        }
    }
    function getOpt(o) {
        switch (o) {
        case 0 :
            return "+";
        case 1 :
            return "-";
        case 2 :
            return "-";
        case 3 :
            return "*";
        case 4 :
            return "/";
        default :
            return "/";
        }
    }
    function getResult(a, x, y, z, flag) {
        var str = "";
        if (flag == 1) {
            if (x == 2 || x == 5) {
                str += a[1]+getOpt(x)+a[0];
            } else {
                str += a[0]+getOpt(x)+a[1];
            }
            /////////////////    
            if (y == 2) {
                if (x<3) {
                    str = a[2]+"-("+str+"";
                } else {
                    str = a[2]+"-"+str;
                }
            } else if (y == 5) {
                str = a[2]+"/("+str+"";
            } else {
                if (x<3 && y>2) {
                    str = "("+str+""+getOpt(y)+a[2];
                } else {
                    str = str+getOpt(y)+a[2];
                }
            }
            ////////////////////////
            if (z == 2) {
                if (x<3 || y<3) {
                    str = a[3]+"-"+str;
                }
            } else if (z == 5) {
                str = a[3]+"/("+str+"";
            } else {
                if ((x<3 || y<3) && z>2) {
                    str = "("+str+""+getOpt(z)+a[3];
                } else {
                    str = str+getOpt(z)+a[3];
                }
            }
        } else if (flag == 2) {
            if (x == 2 || x == 5) {
                str += a[1]+getOpt(x)+a[0];
            } else {
                str += a[0]+getOpt(x)+a[1];
            }
            var str2 = "";
            if (z == 2 || z == 5) {
                str2 += a[3]+getOpt(z)+a[2];
            } else {
                str2 += a[2]+getOpt(z)+a[3];
            }
            if (y>2) {
                if (x<3) {
                    str = "("+str+"";
                }
                if (z<3) {
                    str2 = "("+str2+"";
                }
            }
            if (y == 2 || y == 5) {
                str = str2+getOpt(y)+str;
            } else {
                str = str+getOpt(y)+str2;
            }
        }
        _root.result.result = str+"=24";
    }
}




yutu

职务:普通成员
等级:1
金币:0.0
发贴:16
#42004/3/22 22:17:37
考,这段代码蛮帅的吗?~
不怎么看得懂



point_5d

职务:普通成员
等级:1
金币:0.0
发贴:67
#52004/3/23 9:44:28
我觉得AW的缺点挺多的,在做动画方面比起FLASH的功能要逊很多,但是操作起来比较容易一些,可能我用的AW是D版的,所以这么认为吧!



wdban

职务:普通成员
等级:1
金币:0.0
发贴:16
#62004/4/18 14:53:37
我觉得authorware很有意思,越学就觉得有很多自己懂得东西太少,所以才觉得越有趣。

有时候学一种软件可以带动自己学习其他相关方面的内容和软件,以此扩大知识范围。



wsbad

职务:普通成员
等级:1
金币:0.0
发贴:55
#72004/4/20 15:36:39
其实我用AW也就是用它搭一个台子而已,具体的动画都是在Flash中做好再导入的。



aaaa0bbb

职务:普通成员
等级:1
金币:0.0
发贴:47
#82004/4/20 15:40:12
AW的缺点太多了, 我现在觉得学习它没必要了,还不如有flash做,既少问题又少。