Russian version
English version
| | | | SILICON TAIGA | ISDEF | CD | | | | | | | |
 
 
 
IT-
 
 
 
RSS-


. , zip.
( "ctrl") "" ( "toy"). ( "drag"), , 50 x.
"drag", "ctrl", "Controller" . :
onClipEvent (load) {
direct = 1;
delay=1.01;
}
onClipEvent (mouseDown) {
if (this.hitTest(xm1, ym1, 1)) {
hit = 1;
}
}
onClipEvent (mouseUp) {
hit = 0;
}
onClipEvent (enterFrame) {
xm1 = _root._xmouse;
ym1 = _root._ymouse;
if (hit == 1) {
xpos = xm1-xm2;
}else{
xpos = xpos/delay;
}
this._x += xpos*direct;
if (this._x<0) {
this._x = 0;
direct = -direct;
}
if (this._x>100) {
this._x = 100;
direct = -direct;
}
xm2 = xm1;
_root.toy.gotoAndStop(int(_x));
}

, "" . "" 100 . "stop". (Instance), - "toy".
, "" .

onClipEvent (load) {
direct = 1;
delay=1.01;
}

"direct", , , "drag". "delay", "" - .

onClipEvent (mouseDown) {
if (this.hitTest(xm1, ym1, 1)) {
hit = 1;
}
}

. : (xm1 xm2, , ) "drag", "hit" . , "" , "".

onClipEvent (mouseUp) {
hit = 0;
}

, "". "" "hit".
, "" .

onClipEvent (enterFrame) {
xm1 = _root._xmouse;
ym1 = _root._ymouse;


xm1 ym2 , .

if (hit == 1) {
xpos = xm1-xm2;
}else{
xpos = xpos/delay;
}


"hit", . , "xpos", "" , . ("xpos") , "drag".Ec "hit" , "xpos" , ( "delay").

this._x += xpos*direct;

"drag". "xpos" "direct". , , "drag".

if (this._x<0) {
this._x = 0;
direct = -direct;
}
if (this._x>100) {
this._x = 100;
direct = -direct;
}

"" "drag". "" "", "direct" . "" , .

xm2 = xm1;

"xm2" ( "" ) "xm1" ("" ).

_root.toy.gotoAndStop(int(_x));

. . , , "drag", "int".
. "ctrl", . "drag" "toy".
, .

P.S. , "delay" "1" "1.01", "toy" .


     
 
 
  : 22.04.2006  

| | | | SILICON TAIGA | ISDEF | CD | | | | | | | |

: Silicon Taiga    
Rambler's Top100 Rambler's Top100