, 25 2014 . 08:36
+
_
Adobe Flash CS6 -
, , , , , ...))
( )
novprospekt TweenLite jzayka . ...))
-,
Adobe Flash CS6
Adobe Flash CS6 Portable
, Windows 7, 64 .
.
( ). " "
gs .
4112125_gs.rar
, .
. . Adobe Flash CS6
( , ...))) -:
// TweenLite
import gs.*;
import gs.easing.*;
//
const IMAGE_PIECE_WIDTH:uint = 50;
const IMAGE_PIECE_HEIGHT:uint = 43;
// ,
var imagePieces:Number = 0;
picture.visible=false;
completeHandler();
function completeHandler():void {
// bitmap data
var imageTextureMap:BitmapData = new BitmapData(picture.width,picture.height);
imageTextureMap.draw(picture);
//
var columns:Number = Math.ceil(imageTextureMap.width / IMAGE_PIECE_WIDTH);
var rows:Number = Math.ceil(imageTextureMap.height / IMAGE_PIECE_HEIGHT);
//
for (var i = 0; i < columns; i++) {
//
for (var j = 0; j < rows; j++) {
// -
var imagePieceHolder:MovieClip = new MovieClip();
// , bitmap data
// -.
var imagePiece:Bitmap = new Bitmap();
imagePiece.bitmapData = new BitmapData(IMAGE_PIECE_WIDTH,IMAGE_PIECE_HEIGHT);
// - .
// (1,1) ,
// . (
// ).
imagePiece.bitmapData.copyPixels(imageTextureMap,
new Rectangle(i * IMAGE_PIECE_WIDTH, j * IMAGE_PIECE_HEIGHT,
IMAGE_PIECE_WIDTH, IMAGE_PIECE_HEIGHT),
new Point(1,1));
//
imagePieceHolder.addChild(imagePiece);
// .
// , -.
imagePieceHolder.x = i * IMAGE_PIECE_WIDTH;
imagePieceHolder.y = j * IMAGE_PIECE_HEIGHT;
// ( )
imagePieceHolder.origX = imagePieceHolder.x;
imagePieceHolder.origY = imagePieceHolder.y;
//,
imagePieceHolder.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
//
addChild(imagePieceHolder);
//
imagePieces++;
}
}
}
// ,
function mouseOverHandler(e:Event):void {
//
var imagePieceHolder = (MovieClip)(e.target);
// target
var randomX = Math.random() * 1000 - 500;
var randomY = Math.random() * 1000 - 500;
var targetX = imagePieceHolder.x + randomX;
var targetY = imagePieceHolder.y + randomY;
// , TweenLite.
// "outTweenFinished()" .
TweenLite.to(imagePieceHolder, 1, {x:targetX, y:targetY, onComplete:outTweenFinished, onCompleteParams:[imagePieceHolder]});
// display.
// , .
setChildIndex(imagePieceHolder,imagePieces - 1);
// MOUSE_OVER
imagePieceHolder.removeEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
}
// ,
function outTweenFinished(imagePieceHolder:MovieClip):void {
//
var origX = imagePieceHolder.origX;
var origY = imagePieceHolder.origY;
//
TweenLite.to(imagePieceHolder, 1, {x:origX, y:origY, onComplete:inTweenFinished, onCompleteParams:[imagePieceHolder]});
}
// ,
function inTweenFinished(imagePieceHolder:MovieClip):void {
// MOUSE_OVER
imagePieceHolder.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
}
! .
,
, ,
, . . !!!
" ":
1 - 2 - - ... ... 23 - - - 24 - 25 - Adobe Flash CS6 - 26 - ... 27 - Portable Flash Effect Maker Pro v5.01
"Adobe Flash ":
1 - Adobe Flash CS6 Portable 2 - ... 10 - Adobe Flash CS6( S2) 11 - " " Adobe Flash CS6 12 - Adobe Flash CS6 -