A calming animation that simulates feathers falling gently to the ground. A unique animation that floats your item back and forth gradually and dynamically until it reaches the bottom of your screen.
It can be used for leaves too. It will load in the image dynamically. It is easy to use and is instantiated and setup with a few lines of code. The code commented and documentation is provided.
This file uses Tweener but also has the code for TweenMax commented out. If you prefer that tween engine, it is a simple edit.
Files included with this package:
READ _ME
caurina folder that contains the Tweener classes
feathers.fla – fla from the main preview
feathers.swf – swf from the main preview
FeatherFall.as – a class which controls all the MovieClips and animation
Feather.as – a class which creates the MovieClip for FeatherFall
ImageLoader.as – a simple image loader class
feather.png – the dynamically loaded feather graphic
CODE BREAKDOWN :
import FeatherFall;
var feather:FeatherFall = new FeatherFall(“feather.png”,590,300,30,.2);
feather.x=590/2; //set the position, the feathers will float to the left AND right of this position
addChild(feather);
The function looks like this:
function FeatherFall(url:String,sw:Number,sh:Number,n:Number,d:Number=.5,b:Boolean=true,speed:Array=null,scale:Array=null)
The parameters do the following:
url – the path of the image you wanna load in
sw – stage width OR the width of the area the feathers fall within
sh – stage height OR the height of the area the feathers fall within
n – number of total feathers
d – the delay offset for the initial creation of each feather. (defaults to .5 seconds if omitted)
b – use blur? true/false (defaults to true)
speed – array [x,y] used to define the speed range (defaults to [ 1.5, 2 ] if omitted);
scale – array [x,y] used to define the scale range (defaults to [ .5, 2 ] if omitted);
What is new with Animike Interactive?
Check out my entire portfolio