-

  • (16)
  • (43)
  •    *- (9)
  •    * (1)
  •    * (35)
  • (68)
  •    * ... (34)
  • (599)
  •    *, (7)
  •    * (3)
  •    * (106)
  •    * ... (44)
  •    * ... (9)
  •    * ... (22)
  •    * (3)
  •    * (158)
  •    * ... (50)
  •    * ... (63)
  •    * (51)
  •    *, , (22)
  •    *-, (68)
  •    *, , , (49)
  •    * (14)
  •    * (37)
  • (58)
  • (18)
  • (269)
  •     * (5)
  •    * (8)
  •    *, (4)
  •    * (28)
  •    *, (35)
  •    * (49)
  •    * , (14)
  •    * (18)
  •    * (30)
  •    * (6)
  •    *- (2)
  •    * (9)
  •    * (21)
  •    * (7)
  •    *, (7)
  •    * (2)
  •    * (2)
  •    * (9)
  •    * (30)
  •    * (5)
  •    *, , (16)
  • (108)
  • (306)
  • (53)
  •    *... (14)
  • (62)
  • (5)
  • (343)
  •    *ADOBE FLASH (9)
  •    *HTML- (4)
  •    * (22)
  •     (113)
  •    * (10)
  •    * (56)
  •    * (30)
  •    *- (3)
  •    * (91)
  •    *, , , (25)
  •    * (66)
  • (31)
  • (2)
  • (4)
  • (22)
  • (25)
  •    * (3)
  • (7)
  • (3)
  •    *- (3)
  • - (752)
  •    * (73)
  •    * , (31)
  •    * (75)
  •    * (30)
  •    * (133)
  •    * (195)
  •    * (36)
  •    * (17)
  •    * (5)
  •    *,, (84)
  •    *, (31)
  •    * (11)
  •    * (15)
  •     (46)
  • (255)
  •    * .. (47)
  •    * (118)
  •    * (52)
  •    * (22)
  • (2)
  • (215)
  •    * (7)
  •    * (11)
  •    * (36)
  •    * (95)
  •    * (20)
  •    * (50)
  • (9)
  • ܨ (192)
  •    * (7)
  •    * (6)
  •    *-, (50)
  •    *, , (6)
  •     (7)
  • (15)

 -

: 20 (0)
: 12 (0)
(
: 73 (3)
: 6 (0)
: 20 (1)

 -

  •     - - . : Internet Explorer 6, Fire Fox 1.5, Opera 9.5, Safari 3.1.1 JavaScript.
  • - - - -
  •      ^_^ Html-. ,
  •    - "Empire" - "Empire" Goodgame Empire. , .

 -

, .

 -

   _

 - e-mail

 

 -

 LiveInternet.ru:
: 19.04.2014
: 3360
: 507
: 4419

:


, 25 2014 . 12:26 +
__


AS2 Adobe Flash CS6.

ActionScript 2, , 600450.
, (window)
, , , . window.


, :


onClipEvent (mouseMove)
{
if (!_root.bMouseAction)
{
return;
} // end if
mouse_x = this._xmouse;
mouse_y = this._ymouse;
if (getProperty(this, _height) < mouse_y || getProperty(this, _width) < mouse_x || mouse_y < 0 || mouse_x < 0)
{
_root.bMoveV = false;
_root.bMoveSpeedH = _root.bNormalMoveSpeedH;
_root.bMoveSpeedV = _root.bNormalMoveSpeedV;
return;
} // end if
_root.bMoveH = true;
center_x = getProperty(this, _width) / 2;
if (mouse_x < center_x)
{
_root.bRight = true;
_root.bMoveSpeedH = _root.bMaxMoveSpeedH * (center_x - mouse_x) / center_x;
}
else
{
_root.bRight = false;
_root.bMoveSpeedH = _root.bMaxMoveSpeedH * (mouse_x - center_x) / center_x;
} // end else if
center_y = getProperty(this, _height) / 2;
if (mouse_y < center_y)
{
_root.bDown = true;
_root.bMoveSpeedV = _root.bMaxMoveSpeedV * (center_y - mouse_y) / center_y;
}
else
{
_root.bDown = false;
_root.bMoveSpeedV = _root.bMaxMoveSpeedV * (mouse_y - center_y) / center_y;
} // end else if
}


- 1 2, 1 2( )


, , , , , .
,, ( , 1),' ', photo1
2 1( photo2 (.)



(window), , .
'', 2 1 ,..

AS, :


_root.bMoveH = true;
_root.bRight = true;
_root.bMaxMoveSpeedH = 15;
_root.bNormalMoveSpeedH = 5;
_root.bMoveSpeedH = bNormalMoveSpeedH;
_root.bMoveV = false;
_root.bDown = false;
_root.bMaxMoveSpeedV = 2;
_root.bNormalMoveSpeedV = 1;
_root.bMoveSpeedH = bNormalMoveSpeedV;
_root.photo_left = "photo1";
_root.photo_right = "photo2";
_root.bMouseAction = true;
photo1_x = getProperty("photo1", _x);
photo1_width = getProperty("photo1", _width);
photo1_height = getProperty("photo1", _height);
photo1_y = getProperty("photo1", _y);
win_x = getProperty("window", _x);
win_width = getProperty("window", _width);
win_y = getProperty("window", _y);
win_height = getProperty("window", _height);
if (win_width < photo1_width)
{
setProperty("photo2", _x, photo1_x + photo1_width);
}
else
{
_root.bMoveH = false;
setProperty("photo1", _x, win_x + win_width / 2 - photo1_width / 2);
_root.bMouseAction = false;
} // end else if
setProperty("photo1", _y, win_y + win_height / 2 - photo1_height / 2);
setProperty("photo2", _y, win_y + win_height / 2 - photo1_height / 2);

3, :


function swapToLeft(bToLeft)
{
photo_width = getProperty(_root.photo_left, _width);
left_x = getProperty(_root.photo_left, _x);
right_x = getProperty(_root.photo_right, _x);
if (bToLeft)
{
setProperty(_root.photo_right, _x, left_x - photo_width);
}
else
{
setProperty(_root.photo_left, _x, right_x + photo_width);
} // end else if
tmp = _root.photo_right;
_root.photo_right = _root.photo_left;
_root.photo_left = tmp;
} // End of the function
function moveH(ifRight, sizeMove)
{
left_x = getProperty(_root.photo_left, _x);
right_x = getProperty(_root.photo_right, _x);
width = getProperty(_root.photo_left, _width);
win_x = getProperty("window", _x);
win_width = getProperty("window", _width);
if (ifRight)
{
left_x = left_x + sizeMove;
right_x = right_x + sizeMove;
setProperty(_root.photo_left, _x, left_x);
setProperty(_root.photo_right, _x, right_x);
if (win_x < left_x)
{
swapToLeft(true);
} // end if
}
else
{
left_x = left_x - sizeMove;
right_x = right_x - sizeMove;
setProperty(_root.photo_left, _x, left_x);
setProperty(_root.photo_right, _x, right_x);
if (right_x < win_x)
{
swapToLeft(false);
} // end if
} // end else if
} // End of the function
function moveV(ifDown, sizeMove)
{
y = getProperty(_root.photo_left, _y);
height = getProperty(_root.photo_left, _height);
win_y = getProperty("window", _y);
win_height = getProperty("window", _height);
if (bDown)
{
if (y < win_y)
{
y = win_y < y + bMoveSpeedH ? (win_y) : (y + sizeMove);
} // end if
}
else if (win_y + win_height < y + height)
{
y = y - sizeMove + height < win_y + win_height ? (win_y + win_height - height) : (y - sizeMove);
} // end else if
setProperty(_root.photo_left, _y, y);
} // End of the function
if (_root.bMoveH)
{
moveH(bRight, bMoveSpeedH);
} // end if
if (_root.bMoveV)
{
moveV(bDown, bMoveSpeedV);
} // end if
gotoAndPlay(2);


F5
, .


, .


.

"*ADOBE FLASH":
1 -
2 -
...
5 - "FLFMME". ACTION SCRIPT 2.
6 - . Photo Stack Gallery.
7 -
8 - 3-d . Flash CS 6. Action Script 3.
9 - - -



: [1] []
 

:
: 

: ( )

:

  URL