home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Samsung New PC Studio
/
Samsung_new_Pc_studio.iso
/
Experience
/
Pt_br
/
timeline.swf
/
scripts
/
frame_12
/
DoAction.as
Wrap
Text File
|
2007-09-20
|
4KB
|
139 lines
function ease(mc, xpos, ypos)
{
eval(mc).destX = xpos;
eval(mc).destY = ypos;
eval(mc).t = 0;
eval(mc).bX = eval(mc)._x;
eval(mc).bY = eval(mc)._y;
eval(mc).bS = eval(mc)._xscale;
eval(mc).dX = eval(mc).destX - eval(mc)._x;
eval(mc).dY = eval(mc).destY - eval(mc)._y;
eval(mc).dS = eval(mc).destS - eval(mc)._xscale;
eval(mc).d = 40;
}
_quality = "high";
easeOut3 = function(t, b, c, d)
{
return c * ((t = t / d - 1) * t * t + 1) + b;
};
easeInOut3 = function(t, b, c, d)
{
if((t /= d / 2) < 1)
{
return c / 2 * t * t * t * t + b;
}
return (- c) / 2 * ((t -= 2) * t * t * t - 2) + b;
};
easeInOut4 = function(t, b, c, d)
{
if((t /= d / 2) < 1)
{
return c / 2 * t * t * t * t * t + b;
}
return c / 2 * ((t -= 2) * t * t * t * t + 2) + b;
};
i = 1;
while(i <= 9)
{
mn = this["mn" + i];
mn.num = i;
ease(titleText,tpos0._x,tpos._y);
mn.onEnterFrame = function()
{
if(mnClickFlag)
{
this.dX = this.destX - this._x;
this.dY = this.destY - this._y;
}
else
{
this.dX = this.destX + (300 - _root._xmouse) * 0.05 * Math.floor(this._xscale / 50) - this._x;
this.dY = this.destY + (300 - _root._ymouse) * 0.1 * Math.floor(this._yscale / 50) - this._y;
}
this._x += this.dX * 0.1;
this._y += this.dY * 0.2;
this.dS = this.destS - this._xscale;
this._xscale += this.dS * 0.2;
this._yscale = this._xscale;
this._alpha = this._xscale;
};
if(!_level100.fromSub)
{
mn.onRollOver = function()
{
_level100.NOFIRSTTIME = true;
_level200.snd.gotoAndPlay("snd2");
this.swapDepths(100);
this.ttext.gotoAndPlay("over");
this.destS = 200;
var n = 1;
while(n <= 5)
{
if(n != this.num)
{
cXothers = posCenter._x + (eval("mn" + n)._x - posCenter._x) * 2 - (eval("mn" + n)._x - posCenter._x) / 2;
cYothers = posCenter._y + (eval("mn" + n)._y - posCenter._y) * 2 - (eval("mn" + n)._y - posCenter._y) / 2;
eval("mn" + n).destX = cXothers;
eval("mn" + n).destY = cYothers;
eval("mn" + n).destS = eval("mn" + n).oS - 20;
}
n++;
}
titleText.destS = 200;
ease(titleText,eval("tpos" + this.num)._x,eval("tpos" + this.num)._y);
titleText.gotoAndPlay("mn" + this.num);
};
mn.onRollOut = function()
{
this.ttext.gotoAndPlay("out");
var n = 1;
while(n <= 5)
{
eval("mn" + n).destX = eval("mn" + n).oX;
eval("mn" + n).destY = eval("mn" + n).oY;
eval("mn" + n).destS = eval("mn" + n).oS;
n++;
}
titleText.destS = 100;
ease(titleText,eval("tpos" + this.num)._x,eval("tpos" + this.num)._y + 50);
titleText.gotoAndPlay("mn" + this.num + "out");
};
mn.onRelease = function()
{
_level200.snd.gotoAndPlay("snd3");
this.ttext.gotoAndPlay("out");
this.destS = 200;
mnClickFlag = true;
var n = 1;
while(n <= 5)
{
delete eval("mn" + n).onRollOver;
delete eval("mn" + n).onRollOut;
delete eval("mn" + n).onRelease;
if(n != this.num)
{
cXothers = posCenter._x + (eval("mn" + n)._x - posCenter._x) * 10;
cYothers = posCenter._y + (eval("mn" + n)._y - posCenter._y) * 10;
if(cXothers > -50 && cXothers < 1000)
{
cXothers *= 10;
}
if(cXothers > -50 && cXothers < 700)
{
cYothers *= 10;
}
eval("mn" + n).destX = cXothers;
eval("mn" + n).destY = cYothers;
eval("mn" + n).destS = eval("mn" + n).oS - 20;
}
n++;
}
_level100.mnNumNow = this.num;
_level200.snd.gotoAndPlay("snd6");
gotoAndStop("subMenu");
play();
};
}
i++;
}