home *** CD-ROM | disk | FTP | other *** search
- function alphaTween(mc, style, from, to)
- {
- var _loc1_ = new mx.transitions.Tween(mc,"_alpha",style,from,to,1,true);
- }
- function scaleTween(mc, style, xFrom, xTo, yFrom, yTo)
- {
- var _loc2_ = new mx.transitions.Tween(mc,"_xscale",style,xFrom,xTo,1,true);
- var _loc3_ = new mx.transitions.Tween(mc,"_yscale",style,yFrom,yTo,1,true);
- }
- function moveTween(mc, style, xFrom, xTo, yFrom, yTo)
- {
- var _loc3_ = new mx.transitions.Tween(mc,"_x",style,xFrom,xTo,1,true);
- var _loc2_ = new mx.transitions.Tween(mc,"_y",style,yFrom,yTo,1,true);
- }
- function setBoxs()
- {
- scaleTween(box_mc,mx.transitions.easing.Elastic.easeOut,50,100,50,100);
- wu.start();
- box_mc.onEnterFrame = function()
- {
- if(this._xscale == 100)
- {
- moveTween(box1_btn,mx.transitions.easing.Strong.easeInOut,100,100,-50,128);
- moveTween(box2_btn,mx.transitions.easing.Strong.easeInOut,250,250,-50,130);
- moveTween(box3_btn,mx.transitions.easing.Strong.easeInOut,400,400,-50,130);
- this.onEnterFrame = null;
- }
- };
- var _loc2_ = 1;
- while(_loc2_ <= 3)
- {
- this["box" + _loc2_ + "_btn"].onRelease = function()
- {
- di.start();
- difficulty = this._name.substr(3,1);
- this._parent.gotoAndStop(4);
- };
- _loc2_ = _loc2_ + 1;
- }
- }
- stop();
- var difficulty = 1;
- box1_btn._y = -50;
- box2_btn._y = -50;
- box3_btn._y = -50;
- var wu = new Sound();
- wu.attachSound("wu");
- var di = new Sound();
- di.attachSound("di");
- setBoxs();
-