freddymz
01-22-2008, 03:15 PM
Hello every one
I am new to flash and try to learn it for my business.
I am trying to make a flash movie or graphic
I have a large image that i want to split them to 8 pieces and have them fly around the page and then connected to one large image at the end. :confused:
Would any one know how could i make this work
any help or guide to a tutorial would be appreciated
Thanks all;)
Hi,
You will need 8 movieclips to hold each section of the image. Import an image into flash, break it apart into 8 sections and make each section a movieclip object(F 8 ). Now, you can use Actionscripted motion for each movieclip, or you can click each movieclip and add a motion tween to each movieclips timeline. The first frame will be the beginning position of the particular part of the image and the last frame will be the final position. Do this for each movieclip seperated on different layers. You can then define any motion you choose. If you want the motion more dynamic than a simple motion tween, you will need to look into Actionscripted motion. There are several approaches to AS motion, but the basics are an enterframe event to modify the movieclips _x and _y properties....
this.onEnterFrame=function(){
movieClipInstanceName._x+=5;
movieClipInstanceName._y+=5;
}
The above would simply create a diagonal motion, you would need to modify it to suit your needs for different motion on each movieclip. Here is an example of a bit more advanced motion using basically the same enterframe method but incorporated with a bit of easing and you can define the _x and _y coordinates of where you want the movieclip to move to....
function moveMC(x, y, targ) {
targ.onEnterFrame = function() {
targ._x += (x-this._x)/5;
targ._y += (y-this._y)/5;
if (Math.abs(x-this._x)<1) {
targ._x = x;
targ._y = y;
delete targ.onEnterFrame;
}
}
}
btn1.onRelease = function() {
moveMC(100, 100, mcInstanceName);
}
//or call the function directly without a button event
moveMC(100,100,mcInstanceName)
Hope it helps
NTD
Powered by vBulletin™ Version 4.1.1 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.