edmond
08-19-2006, 08:17 PM
http://www.templatemonster.com/flash-templates/11659.html
Click on the > button or any of the image catagories and you'll see the image transition. I was wondering how this is done. Thanks.
mooska
08-20-2006, 10:25 AM
Here what you have to do
first frame as
var a = ["clip1", "clip2"];
var counter = 0;
var mask:MovieClip;
var mc:MovieClip;
btn.onPress = function() {
mc.removeMovieClip();
mask.removeMovieClip();
mc = this._parent.attachMovie(a[counter], "myimage", this._parent.getNextHighestDepth());
mask = this._parent.attachMovie("mymask", "mymask", this._parent.getNextHighestDepth());
mc.setMask(mask);
this._parent.mymask.gotoAndPlay(1);
counter = (counter == 1) ? 0 : counter+1;
trace(counter);
};
in the library place mcs with linkages from the array , on the scene place button named btn, create animation of growing rectangle, name it rect and create empty movieClip, placevar c = 0;
this.onEnterFrame = function() {
for (i=0; i<10; i++) {
this.attachMovie("rect", "rect"+i, this.getNextHighestDepth(), {_x:i*30+random(3), _y:c*30+random(3)});
}
c++;
if (c == 20) {
delete this.onEnterFrame;
}
};
into its first frame
and test it.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.