My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members

Official Description

Minion is a mini animation library for AS2 intended for use in scenarios with strong size limitations, such as Flash banners.

Some facts:

  • It's an early ALPHA. It has hardly been tested, never used in the field and the API is quite likely to change (although not drastically). Any feedback is hugely appreciated.
  • Adds roughly 1.5KB to file size
  • Supports chaining and per-property tween overwrite (as of now, it's the only overwrite mode)
  • Time based; supports relative tween duration, i.e. negative durations will be interpreted as a a positive multiple of the default tween duration (set with Minion.TEMPO)
  • Does NOT use standard tween equation. For easing, a function is used, that should go through (0,0) and (1,1). Anything else is up to your fantasy. The default easing function is Math.sqrt. You can however transform any standard equation to a Minion tween function using Minion.ease.
  • Supports Bezier tweening (of some sort) (at the cost of higher file size)
  • Syntax is strongly inspired from eaze, which unfortunately is unavailable for AS2
  • MTASC and Flash IDE compatible
  • Bundles its own function binder (as an alternative to Delegate.create)

Here's some sample code:

//create a few clips - I am sure you'll be able to create your own square method ;)
var mc1 = square(), mc2 = square(), mc3 = square(), mc4 = square();			
//define some states
var right = { _x:100 }, down = { _y:100 }, left = { _x:0 }, up = { _y:0 }, 
    clock = { _rotation:90 }, zero = { _x:0, _y:0, _rotation:0 };
	
//let's waltz!
with (Minion.summon(mc1).to(right)) {
	chain(mc1).to(down)
	with(chain(mc2).to(right)) {
		chain(mc1).to(left)
		chain(mc2).to(down)
		with (chain(mc3).to(right)) {
			chain(mc3).to(clock).to(zero)					
			chain(mc4).to(right).wait(-2).to(zero)					
			chain(mc1).to(right).wait(-4).to(zero)
			with (chain(mc2).to(clock).wait(-6).to(zero)) {
				chain(mc4).wait().to({_x:330})
				chain(mc3).wait(-1.5).to({_x:220})
				chain(mc2).wait(-2.0).to({_x:110})
			}
		}
	}
}		

The Truth

Minion is an obedient servant intended for the ambitious mastermind, who takes pleasure from power as his evil plan is carried out by an army of diligent subjects.

Powered by Google Project Hosting