nn ricordo dove ma si scarica

il codice cmq è questo

codice:
/*
Tweening prototypes for AS 1.0
version 1.1.6
Ladislav Zigo,lacoz@web.de
*/
#include "easing_equations.as"
//
var Mp = MovieClip.prototype;
//
AsBroadcaster.initialize(Mp);
Mp.$addListener = Mp.addListener;
ASSetPropFlags(Mp, "$addListener", 1, 0);
Mp.addListener = function(){
	AsBroadcaster.initialize(this);
	this.$addListener.apply(this,arguments);
}
//
function tweenManager() {
 this.playing = false
 this.autoStop = false;
 this.broadcastEvents = false; 
 this.autoOverwrite = true; 
 this.tweenList = new Array()
 this.ints = new Array();
 this.lockedTweens = new Object();
 this.tweenHolder = _root.createEmptyMovieClip("_th_", 6789);
 this.now = 0;
}
var tp = tweenManager.prototype;
//
tp.init = function(){
	with(this){
		if(tweenHolder._name == undefined){
			// 
			tweenHolder = _root.createEmptyMovieClip("_th_",6789); 
		}
		//tweenHolder.onEnterFrame = update
		tweenHolder.onEnterFrame = function(){
			// this is faster because it eliminates usage of keyword "with" in update function
			_global.$tweenManager.update.call(_global.$tweenManager);
		}
		playing = true;
		
		now = getTimer();
	
	}
}
//
tp.deinit = function(){
	this.playing = false;
	delete this.tweenHolder.onEnterFrame;
}
//-------------------------- private  methods
tp.update = function() {
	var i, t, j;
	i = this.tweenList.length;
	if(this.broadcastEvents){
		// list of updated mcs
		var ut = {};
		// list of ending mcs
		var et = {};
	}
	while (i--) {
		t = this.tweenList[i];
		if (t.ts+t.d>this.now) {
			// compute value using equation function
			if (t.ctm == undefined) {
				// compute primitive value
				t.mc[t.pp] = t.ef(this.now-t.ts, t.ps, t.ch, t.d, t.e1, t.e2);
			} else {
				// compute color transform matrix 
				// stm is starting transform matrix, 
				// ctm is change in start & destination matrix 
				// ttm is computed (temporary) transform matrix
				// c is color object
				var ttm = {};
				for (j in t.ctm) {
					ttm[j] = t.ef(this.now-t.ts, t.stm[j], t.ctm[j], t.d, t.e1, t.e2);
				}
				t.c.setTransform(ttm);
			}
			if(this.broadcastEvents && ut[targetpath(t.mc)] == undefined){
				ut[targetpath(t.mc)] = t.mc;
			}
			if(t.cb.updfunc != undefined){
				t.cb.updfunc.apply(t.cb.updscope,t.cb.updargs);
			}
		} else {
			// end , set up the property to end value;
			if (t.ctm == undefined) {
				t.mc[t.pp] = t.ps+t.ch;
			} else {
				var ttm = {};
				for (j in t.ctm) {
					ttm[j] = t.stm[j]+t.ctm[j];
				}
				t.c.setTransform(ttm);
			}
			if(this.broadcastEvents){
				if(ut[targetpath(t.mc)] == undefined){
					ut[targetpath(t.mc)] = t.mc;
				}
				
				if(et[targetpath(t.mc)] == undefined){
					et[targetpath(t.mc)] = t.mc;
				}
			}
			if(t.cb.updfunc != undefined){
				t.cb.updfunc.apply(t.cb.updscope,t.cb.updargs);
			}
			if (endt == undefined){
				var endt = new Array();
			}
			endt.push(i);
		}
	}
	for (j in ut){
		ut[j].broadcastMessage('onTweenUpdate');
	}
	if(endt != undefined){
		this.endTweens(endt);
	}
	for (j in et){
		et[j].broadcastMessage('onTweenEnd');
	}
	this.now = getTimer();
	// update timer 
};
tp.endTweens = function(tid_arr){
var cb_arr, tl, i, cb, j
cb_arr = []
// splice tweens from tweenlist 
tl = tid_arr.length
with(this){
	for (i = 0; i<tl; i++){
		cb = tweenList[tid_arr[i]].cb
		if(cb != undefined){
			var exec = true;
			//do not add callbacks that are in cb_arr
			for(j in cb_arr){
				if (cb_arr[j] ==  cb){
					exec = false;
					break;
				}
			}
			//
			if(exec){
				cb_arr.push(cb)
			}
		}
		tweenList.splice(tid_arr[i],1);
	}
	// execute callbacks
	for (i = 0; i<cb_arr.length;i++){
		cb_arr[i].func.apply(cb_arr[i].scope,cb_arr[i].args)
	}
	//
	// /*1.1.6*/
	if(tweenList.length==0){
	// last tween removed, erase onenterframe function
		deinit();
	}
}
}
// ------------- public methods
tp.addTween = function(mc,props,pEnd,sec,eqFunc,callback,extra1,extra2){
	var i, pp, addnew, j, t;
	with(this){
		//
		if(!playing){
			init();
		}
		for(i in props){
			pp = props[i];
			addnew = true;
			//
			if(pp.substr(0,4)!="_ct_"){
				// there is no color transform prefix, use primitive value tween
				//
				if(autoOverwrite){
					// find coliding tween and overwrite it 
					for (j in tweenList){
						t = tweenList[j];
						if(t.mc == mc && t.pp == pp){
							//
							t.ps = mc[pp];
							t.ch = pEnd[i] - mc[pp];
							t.ts = now;
							t.d = sec*1000;
							t.ef = eqFunc;
							t.cb = callback;
							t.e1 = extra1;
							t.e2 = extra2;
							addnew = false;												break;
						}
					}
				}
				if(addnew){	
				// not found add new
				tweenList.unshift({							
						  mc: mc,				
						  pp: pp, 				
						  ps: mc[pp],			
						  ch: pEnd[i] - mc[pp], 
						  ts: now, 				
						  d:  sec * 1000, 		
						  ef: eqFunc, 			
						  cb: callback,			
						  e1: extra1,			
						  e2: extra2});			
				}
			}else{
				// color trasform prefix found	
				// compute change matrix
				var c = new Color(mc);
				var stm = c.getTransform();
				// compute difference between starting and desionation matrix
				var ctm = {}
				for(j in pEnd[i]){
					// if is in destination matrix 
					if(pEnd[i][j] != stm[j] && pEnd[i][j] != undefined ){
						ctm[j] = pEnd[i][j] - stm[j];
					}
				}
				if(autoOverwrite){
				// find coliding tween and overwrite it 
				for (j in tweenList){
					t = tweenList[j];
					if(t.mc == mc && t.ctm != undefined){
							//
							t.c = c
							t.stm = stm	
							t.ctm =  ctm,
							t.ts = now;
							t.d = sec*1000;
							t.ef = eqFunc;
							t.cb = callback;
							t.e1 = extra1;
							t.e2 = extra2;
							addnew = false;												break;
						}
					}
				}
				if(addnew){	
				tweenList.unshift({
						mc:  mc,			//reference to movieclip
						c:   c,				//reference to movieclip color
						stm: stm,			//starting transform matrix
						ctm: ctm,			
						ts:  now,
						d:   sec * 1000,
						ef:  eqFunc,
						cb:  callback,
						e1:  extra1,
						e2:  extra2
					})
				}			
				
			}
		} // end for
	if(broadcastEvents){
		mc.broadcastMessage('onTweenStart'); 				
	}
	if(callback.startfunc != undefined){
		callback.startfunc.apply(callback.startscope,callback.startargs)
	}
	}// end with
}
.....il codice continua sotto