Tweening array in the loop

Basically here is my problem: I have a stage with 13 movie clips( all named differently) that appear one after another forging a map of a country.
Once settled onRollover they get Tween elastic _xscale, _yscale effect, and onRollOut they go back to their respective normal sizes.

so far, so good - Perfectly working.

what I want is that once the movie clips have settled down on stage- they will be tweened once (as they are currently tweened onRollover/onRollout) before I will mouse over.

here is my current action frame that works (without any array tween etc)
It would be nice if someone could help to explain to me how can I make all movie clips todemonstrate Tween (xscale/yscale effect upon on enterFrame(like enlarge/descrease in size - in and out).

import mx.transitions.Tween;
import mx.transitions.easing.*;
import flash.filters.DropShadowFilter;


 

/* each movie clip must have a name "YU"(when created) and instance name like "mc_YU" (done in properties)*/

/* -------------------START----------------for each of the movie clips---------------------------START------------------------ */
mc_YU.onRollOver = function() {
	/* bring to fron movie clip above the rest (only on RollOver) --- code STARTS here ---*/
	_root.x +=2;
	_root.mc_YU.swapDepths(_root.x);
	/* bring to front movie clip above the rest (only on RollOver) --- code ENDS here ---*/
	/*--- scale tween code starts here*/
	var xscTweenOver:Tween = new Tween(this, "_xscale", Elastic.easeOut, this._xscale, 150, 2, true);
	var yscTweenOver:Tween = new Tween(this, "_yscale", Elastic.easeOut, this._yscale, 150, 2, true);
	/*--- scale tween code starts here*/
	/*--- drop shadow filter code starts here*/
	var filter:DropShadowFilter = new DropShadowFilter(15, 45, 0x000000, 0.8,16, 16, 1, 3, false, false, false);
	var filterArray:Array = new Array();
	filterArray.push(filter);
	this.filters = filterArray;
	 /*--- drop shadow filter code ends here */
};
mc_YU.onRollOut = function() {
	/*--- un-scale tween code starts here*/
	var xscTweenOver:Tween = new Tween(this, "_xscale", Elastic.easeOut, this._xscale, 100, 2, true);
	var yscTweenOver:Tween = new Tween(this, "_yscale", Elastic.easeOut, this._yscale, 100, 2, true);
	/*--- un-scale tween code starts here*/
	stopAllSounds;
	/* drop shadow CLEAR filter STARTS here */
	mc_YU.filters =undefined;	
	/* drop shadow CLEAR filter ENDS here*/
};
mc_YU.onRelease = function (){
 getURL("gallery/ama/ama.html")
 };
/* ------------------END----------------for each of the movie clips-----------------------------END-------------------------- */
/* -------------------START----------------for each of the movie clips---------------------------START------------------------ */
mc_NW.onRollOver = function() {
	/* bring to fron movie clip above the rest (only on RollOver) --- code STARTS here ---*/
	_root.x +=2;
	_root.mc_NW.swapDepths(_root.x);
	/* bring to fron movie clip above the rest (only on RollOver) --- code ENDS here ---*/
	/*--- scale tween code starts here*/
	var xscTweenOver:Tween = new Tween(this, "_xscale", Elastic.easeOut, this._xscale, 150, 2, true);
	/*                                                                       ---size up(150), 2(speed, the higher the value the faster the speed) */
	var yscTweenOver:Tween = new Tween(this, "_yscale", Elastic.easeOut, this._yscale, 150, 2, true);
	/*--- scale tween code starts here*/
	/*--- drop shadow filter code starts here*/
	var filter:DropShadowFilter = new DropShadowFilter(15, 45, 0x000000, 0.8,16, 16, 1, 3, false, false, false);
	var filterArray:Array = new Array();
	filterArray.push(filter);
	this.filters = filterArray;
	 /*--- drop shadow filter code ends here */
};
mc_NW.onRollOut = function() {
	/*--- un-scale tween code starts here*/
	var xscTweenOver:Tween = new Tween(this, "_xscale", Elastic.easeOut, this._xscale, 100, 2, true);
	var yscTweenOver:Tween = new Tween(this, "_yscale", Elastic.easeOut, this._yscale, 100, 2, true);
	/*--- un-scale tween code starts here*/
	stopAllSounds;
	/* drop shadow CLEAR filter STARTS here */
	mc_NW.filters =undefined;	
	/* drop shadow CLEAR filter ENDS here*/
};
mc_NW.onRelease = function (){
 getURL("gallery/ama/ama.html")
 };
/* ------------------END----------------for each of the movie clips-----------------------------END-------------------------- */
/* -------------------START----------------for each of the movie clips---------------------------START------------------------ */
mc_NU.onRollOver = function() {
	/* bring to fron movie clip above the rest (only on RollOver) --- code STARTS here ---*/
	_root.x +=2;
	_root.mc_NU.swapDepths(_root.x);
	/* bring to fron movie clip above the rest (only on RollOver) --- code ENDS here ---*/
	/*--- scale tween code starts here*/
	var xscTweenOver:Tween = new Tween(this, "_xscale", Elastic.easeOut, this._xscale, 150, 2, true);
	var yscTweenOver:Tween = new Tween(this, "_yscale", Elastic.easeOut, this._yscale, 150, 2, true);
	/*--- scale tween code starts here*/
	/*--- drop shadow filter code starts here*/
	var filter:DropShadowFilter = new DropShadowFilter(15, 45, 0x000000, 0.8,16, 16, 1, 3, false, false, false);
	var filterArray:Array = new Array();
	filterArray.push(filter);
	this.filters = filterArray;
	 /*--- drop shadow filter code ends here */
};
mc_NU.onRollOut = function() {
	/*--- un-scale tween code starts here*/
	var xscTweenOver:Tween = new Tween(this, "_xscale", Elastic.easeOut, this._xscale, 100, 2, true);
	var yscTweenOver:Tween = new Tween(this, "_yscale", Elastic.easeOut, this._yscale, 100, 2, true);
	/*--- un-scale tween code starts here*/
	stopAllSounds;
	/* drop shadow CLEAR filter STARTS here */
	mc_NU.filters =undefined;	
	/* drop shadow CLEAR filter ENDS here*/
};
mc_NU.onRelease = function (){
 getURL("gallery/ama/ama.html")
 };
/* ------------------END----------------for each of the movie clips-----------------------------END-------------------------- */
/* -------------------START----------------for each of the movie clips---------------------------START------------------------ */
mc_BC.onRollOver = function() {
	/* bring to fron movie clip above the rest (only on RollOver) --- code STARTS here ---*/
	_root.x +=2;
	_root.mc_BC.swapDepths(_root.x);
	/* bring to fron movie clip above the rest (only on RollOver) --- code ENDS here ---*/	
	/*--- scale tween code starts here*/
	var xscTweenOver:Tween = new Tween(this, "_xscale", Elastic.easeOut, this._xscale, 150, 2, true);
	var yscTweenOver:Tween = new Tween(this, "_yscale", Elastic.easeOut, this._yscale, 150, 2, true);
	/*--- scale tween code starts here*/
	/*--- drop shadow filter code starts here*/
	var filter:DropShadowFilter = new DropShadowFilter(15, 45, 0x000000, 0.8,16, 16, 1, 3, false, false, false);
	var filterArray:Array = new Array();
	filterArray.push(filter);
	this.filters = filterArray;
	 /*--- drop shadow filter code ends here */
};
mc_BC.onRollOut = function() {
	/*--- un-scale tween code starts here*/
	var xscTweenOver:Tween = new Tween(this, "_xscale", Elastic.easeOut, this._xscale, 100, 2, true);
	var yscTweenOver:Tween = new Tween(this, "_yscale", Elastic.easeOut, this._yscale, 100, 2, true);
	/*--- un-scale tween code starts here*/
	stopAllSounds;
	/* drop shadow CLEAR filter STARTS here */
	mc_BC.filters =undefined;	
	/* drop shadow CLEAR filter ENDS here*/
};
mc_BC.onRelease = function (){
 getURL("gallery/ama/ama.html")
 };
/* ------------------END----------------for each of the movie clips-----------------------------END-------------------------- */
/* -------------------START----------------for each of the movie clips---------------------------START------------------------ */
mc_AB.onRollOver = function() {
	/* bring to fron movie clip above the rest (only on RollOver) --- code STARTS here ---*/
	_root.x +=2;
	_root.mc_AB.swapDepths(_root.x);
	/* bring to fron movie clip above the rest (only on RollOver) --- code ENDS here ---*/	
	/*--- scale tween code starts here*/
	var xscTweenOver:Tween = new Tween(this, "_xscale", Elastic.easeOut, this._xscale, 150, 2, true);
	var yscTweenOver:Tween = new Tween(this, "_yscale", Elastic.easeOut, this._yscale, 150, 2, true);
	/*--- scale tween code starts here*/
	/*--- drop shadow filter code starts here*/
	var filter:DropShadowFilter = new DropShadowFilter(15, 45, 0x000000, 0.8,16, 16, 1, 3, false, false, false);
	var filterArray:Array = new Array();
	filterArray.push(filter);
	this.filters = filterArray;
	 /*--- drop shadow filter code ends here */
};
mc_AB.onRollOut = function() {
	/*--- un-scale tween code starts here*/
	var xscTweenOver:Tween = new Tween(this, "_xscale", Elastic.easeOut, this._xscale, 100, 2, true);
	var yscTweenOver:Tween = new Tween(this, "_yscale", Elastic.easeOut, this._yscale, 100, 2, true);
	/*--- un-scale tween code starts here*/
	stopAllSounds;
	/* drop shadow CLEAR filter STARTS here */
	mc_AB.filters =undefined;	
	/* drop shadow CLEAR filter ENDS here*/
};
mc_AB.onRelease = function (){
 getURL("gallery/ama/ama.html")
 };
/* ------------------END----------------for each of the movie clips-----------------------------END-------------------------- */
/* -------------------START----------------for each of the movie clips---------------------------START------------------------ */
mc_SK.onRollOver = function() {
	/* bring to fron movie clip above the rest (only on RollOver) --- code STARTS here ---*/
	_root.x +=2;
	_root.mc_SK.swapDepths(_root.x);
	/* bring to fron movie clip above the rest (only on RollOver) --- code ENDS here ---*/
	/*--- scale tween code starts here*/
	var xscTweenOver:Tween = new Tween(this, "_xscale", Elastic.easeOut, this._xscale, 150, 2, true);
	var yscTweenOver:Tween = new Tween(this, "_yscale", Elastic.easeOut, this._yscale, 150, 2, true);
	/*--- scale tween code starts here*/
	/*--- drop shadow filter code starts here*/
	var filter:DropShadowFilter = new DropShadowFilter(15, 45, 0x000000, 0.8,16, 16, 1, 3, false, false, false);
	var filterArray:Array = new Array();
	filterArray.push(filter);
	this.filters = filterArray;
	 /*--- drop shadow filter code ends here */
};
mc_SK.onRollOut = function() {
	/*--- un-scale tween code starts here*/
	var xscTweenOver:Tween = new Tween(this, "_xscale", Elastic.easeOut, this._xscale, 100, 2, true);
	var yscTweenOver:Tween = new Tween(this, "_yscale", Elastic.easeOut, this._yscale, 100, 2, true);
	/*--- un-scale tween code starts here*/
	stopAllSounds;
	/* drop shadow CLEAR filter STARTS here */
	mc_SK.filters =undefined;	
	/* drop shadow CLEAR filter ENDS here*/
};
mc_SK.onRelease = function (){
 getURL("gallery/ama/ama.html")
 };
/* ------------------END----------------for each of the movie clips-----------------------------END-------------------------- */
/* -------------------START----------------for each of the movie clips---------------------------START------------------------ */
mc_MB.onRollOver = function() {
	/* bring to fron movie clip above the rest (only on RollOver) --- code STARTS here ---*/
	_root.x +=2;
	_root.mc_MB.swapDepths(_root.x);
	/* bring to fron movie clip above the rest (only on RollOver) --- code ENDS here ---*/
	/*--- scale tween code starts here*/
	var xscTweenOver:Tween = new Tween(this, "_xscale", Elastic.easeOut, this._xscale, 150, 2, true);
	var yscTweenOver:Tween = new Tween(this, "_yscale", Elastic.easeOut, this._yscale, 150, 2, true);
	/*--- scale tween code starts here*/
	/*--- drop shadow filter code starts here*/
	var filter:DropShadowFilter = new DropShadowFilter(15, 45, 0x000000, 0.8,16, 16, 1, 3, false, false, false);
	var filterArray:Array = new Array();
	filterArray.push(filter);
	this.filters = filterArray;
	 /*--- drop shadow filter code ends here */
};
mc_MB.onRollOut = function() {
	/*--- un-scale tween code starts here*/
	var xscTweenOver:Tween = new Tween(this, "_xscale", Elastic.easeOut, this._xscale, 100, 2, true);
	var yscTweenOver:Tween = new Tween(this, "_yscale", Elastic.easeOut, this._yscale, 100, 2, true);
	/*--- un-scale tween code starts here*/
	stopAllSounds;
	/* drop shadow CLEAR filter STARTS here */
	mc_MB.filters =undefined;	
	/* drop shadow CLEAR filter ENDS here*/
};
mc_MB.onRelease = function (){
 getURL("gallery/ama/ama.html")
 };
/* ------------------END----------------for each of the movie clips-----------------------------END-------------------------- */
/* -------------------START----------------for each of the movie clips---------------------------START------------------------ */
mc_ON.onRollOver = function() {
	/* bring to fron movie clip above the rest (only on RollOver) --- code STARTS here ---*/
	_root.x +=2;
	_root.mc_ON.swapDepths(_root.x);
	/* bring to fron movie clip above the rest (only on RollOver) --- code ENDS here ---*/
	/*--- scale tween code starts here*/
	var xscTweenOver:Tween = new Tween(this, "_xscale", Elastic.easeOut, this._xscale, 150, 2, true);
	var yscTweenOver:Tween = new Tween(this, "_yscale", Elastic.easeOut, this._yscale, 150, 2, true);
	/*--- scale tween code starts here*/
	/*--- drop shadow filter code starts here*/
	var filter:DropShadowFilter = new DropShadowFilter(15, 45, 0x000000, 0.8,16, 16, 1, 3, false, false, false);
	var filterArray:Array = new Array();
	filterArray.push(filter);
	this.filters = filterArray;
	 /*--- drop shadow filter code ends here */
};
mc_ON.onRollOut = function() {
	/*--- un-scale tween code starts here*/
	var xscTweenOver:Tween = new Tween(this, "_xscale", Elastic.easeOut, this._xscale, 100, 2, true);
	var yscTweenOver:Tween = new Tween(this, "_yscale", Elastic.easeOut, this._yscale, 100, 2, true);
	/*--- un-scale tween code starts here*/
	stopAllSounds;
	/* drop shadow CLEAR filter STARTS here */
	mc_ON.filters =undefined;	
	/* drop shadow CLEAR filter ENDS here*/
};
mc_ON.onRelease = function (){
 getURL("gallery/ama/ama.html")
 };
/* ------------------END----------------for each of the movie clips-----------------------------END-------------------------- */
/* -------------------START----------------for each of the movie clips---------------------------START------------------------ */
mc_QC.onRollOver = function() {
		/* bring to fron movie clip above the rest (only on RollOver) --- code STARTS here ---*/
	_root.x +=2;
	_root.mc_QC.swapDepths(_root.x);
	/* bring to fron movie clip above the rest (only on RollOver) --- code ENDS here ---*/
	/*--- scale tween code starts here*/
	var xscTweenOver:Tween = new Tween(this, "_xscale", Elastic.easeOut, this._xscale, 150, 2, true);
	var yscTweenOver:Tween = new Tween(this, "_yscale", Elastic.easeOut, this._yscale, 150, 2, true);
	/*--- scale tween code starts here*/
	/*--- drop shadow filter code starts here*/
	var filter:DropShadowFilter = new DropShadowFilter(15, 45, 0x000000, 0.8,16, 16, 1, 3, false, false, false);
	var filterArray:Array = new Array();
	filterArray.push(filter);
	this.filters = filterArray;
	 /*--- drop shadow filter code ends here */
};
mc_QC.onRollOut = function() {
	/*--- un-scale tween code starts here*/
	var xscTweenOver:Tween = new Tween(this, "_xscale", Elastic.easeOut, this._xscale, 100, 2, true);
	var yscTweenOver:Tween = new Tween(this, "_yscale", Elastic.easeOut, this._yscale, 100, 2, true);
	/*--- un-scale tween code starts here*/
	stopAllSounds;
	/* drop shadow CLEAR filter STARTS here */
	mc_QC.filters =undefined;	
	/* drop shadow CLEAR filter ENDS here*/
};
mc_QC.onRelease = function (){
 getURL("gallery/ama/ama.html")
 };
/* ------------------END----------------for each of the movie clips-----------------------------END-------------------------- */
/* -------------------START----------------for each of the movie clips---------------------------START------------------------ */
mc_NB.onRollOver = function() {
	/* bring to fron movie clip above the rest (only on RollOver) --- code STARTS here ---*/
	_root.x +=2;
	_root.mc_NB.swapDepths(_root.x);
	/* bring to fron movie clip above the rest (only on RollOver) --- code ENDS here ---*/
	/*--- scale tween code starts here*/
	var xscTweenOver:Tween = new Tween(this, "_xscale", Elastic.easeOut, this._xscale, 250, 2, true);
	var yscTweenOver:Tween = new Tween(this, "_yscale", Elastic.easeOut, this._yscale, 250, 2, true);
	/*--- scale tween code starts here*/
	/*--- drop shadow filter code starts here*/
	var filter:DropShadowFilter = new DropShadowFilter(15, 45, 0x000000, 0.8,16, 16, 1, 3, false, false, false);
	var filterArray:Array = new Array();
	filterArray.push(filter);
	this.filters = filterArray;
	 /*--- drop shadow filter code ends here */
};
mc_NB.onRollOut = function() {
	/*--- un-scale tween code starts here*/
	var xscTweenOver:Tween = new Tween(this, "_xscale", Elastic.easeOut, this._xscale, 100, 2, true);
	var yscTweenOver:Tween = new Tween(this, "_yscale", Elastic.easeOut, this._yscale, 100, 2, true);
	/*--- un-scale tween code starts here*/
	stopAllSounds;
	/* drop shadow CLEAR filter STARTS here */
	mc_NB.filters =undefined;	
	/* drop shadow CLEAR filter ENDS here*/
};
mc_NB.onRelease = function (){
 getURL("gallery/ama/ama.html")
 };
/* ------------------END----------------for each of the movie clips-----------------------------END-------------------------- */
/* -------------------START----------------for each of the movie clips---------------------------START------------------------ */
mc_PE.onRollOver = function() {
	/* bring to fron movie clip above the rest (only on RollOver) --- code STARTS here ---*/
	_root.x +=2;
	_root.mc_PE.swapDepths(_root.x);
	/* bring to fron movie clip above the rest (only on RollOver) --- code ENDS here ---*/
	/*--- scale tween code starts here*/
	var xscTweenOver:Tween = new Tween(this, "_xscale", Elastic.easeOut, this._xscale, 550, 2, true);
	var yscTweenOver:Tween = new Tween(this, "_yscale", Elastic.easeOut, this._yscale, 550, 2, true);
	/*--- scale tween code starts here*/
	/*--- drop shadow filter code starts here*/
	var filter:DropShadowFilter = new DropShadowFilter(15, 45, 0x000000, 0.8,16, 16, 1, 3, false, false, false);
	var filterArray:Array = new Array();
	filterArray.push(filter);
	this.filters = filterArray;
	 /*--- drop shadow filter code ends here */
};
mc_PE.onRollOut = function() {
	/*--- un-scale tween code starts here*/
	var xscTweenOver:Tween = new Tween(this, "_xscale", Elastic.easeOut, this._xscale, 100, 2, true);
	var yscTweenOver:Tween = new Tween(this, "_yscale", Elastic.easeOut, this._yscale, 100, 2, true);
	/*--- un-scale tween code starts here*/
	stopAllSounds;
	/* drop shadow CLEAR filter STARTS here */
	mc_PE.filters =undefined;	
	/* drop shadow CLEAR filter ENDS here*/
};
mc_PE.onRelease = function (){
 getURL("gallery/ama/ama.html")
 };
/* ------------------END----------------for each of the movie clips-----------------------------END-------------------------- */
/* -------------------START----------------for each of the movie clips---------------------------START------------------------ */
mc_NS.onRollOver = function() {
	/* bring to fron movie clip above the rest (only on RollOver) --- code STARTS here ---*/
	_root.x +=2;
	_root.mc_NS.swapDepths(_root.x);
	/* bring to fron movie clip above the rest (only on RollOver) --- code ENDS here ---*/
	/*--- scale tween code starts here*/
	var xscTweenOver:Tween = new Tween(this, "_xscale", Elastic.easeOut, this._xscale, 250, 2, true);
	var yscTweenOver:Tween = new Tween(this, "_yscale", Elastic.easeOut, this._yscale, 250, 2, true);
	/*--- scale tween code starts here*/
	/*--- drop shadow filter code starts here*/
	var filter:DropShadowFilter = new DropShadowFilter(15, 45, 0x000000, 0.8,16, 16, 1, 3, false, false, false);
	var filterArray:Array = new Array();
	filterArray.push(filter);
	this.filters = filterArray;
	 /*--- drop shadow filter code ends here */
};
mc_NS.onRollOut = function() {
	/*--- un-scale tween code starts here*/
	var xscTweenOver:Tween = new Tween(this, "_xscale", Elastic.easeOut, this._xscale, 100, 2, true);
	var yscTweenOver:Tween = new Tween(this, "_yscale", Elastic.easeOut, this._yscale, 100, 2, true);
	/*--- un-scale tween code starts here*/
	stopAllSounds;
	/* drop shadow CLEAR filter STARTS here */
	mc_NS.filters =undefined;	
	/* drop shadow CLEAR filter ENDS here*/
};
mc_NS.onRelease = function (){
 getURL("gallery/ama/ama.html")
 };
/* ------------------END----------------for each of the movie clips-----------------------------END-------------------------- */
/* -------------------START----------------for each of the movie clips---------------------------START------------------------ */
mc_NF.onRollOver = function() {
	/* bring to fron movie clip above the rest (only on RollOver) --- code STARTS here ---*/
	_root.x +=2;
	_root.mc_NF.swapDepths(_root.x);
	/* bring to fron movie clip above the rest (only on RollOver) --- code ENDS here ---*/
	/*--- scale tween code starts here*/
	var xscTweenOver:Tween = new Tween(this, "_xscale", Elastic.easeOut, this._xscale, 150, 2, true);
	var yscTweenOver:Tween = new Tween(this, "_yscale", Elastic.easeOut, this._yscale, 150, 2, true);
	/*--- scale tween code starts here*/
	/*--- drop shadow filter code starts here*/
	var filter:DropShadowFilter = new DropShadowFilter(15, 45, 0x000000, 0.8,16, 16, 1, 3, false, false, false);
	var filterArray:Array = new Array();
	filterArray.push(filter);
	this.filters = filterArray;
	 /*--- drop shadow filter code ends here */
};
mc_NF.onRollOut = function() {
	/*--- un-scale tween code starts here*/
	var xscTweenOver:Tween = new Tween(this, "_xscale", Elastic.easeOut, this._xscale, 100, 2, true);
	var yscTweenOver:Tween = new Tween(this, "_yscale", Elastic.easeOut, this._yscale, 100, 2, true);
	/*--- un-scale tween code starts here*/
	stopAllSounds;
	/* drop shadow CLEAR filter STARTS here */
	mc_NF.filters =undefined;	
	/* drop shadow CLEAR filter ENDS here*/
};
mc_NF.onRelease = function (){
 getURL("gallery/ama/ama.html")
 };
/* ------------------END----------------for each of the movie clips-----------------------------END-------------------------- */
 stop();

in short:

import mx.transitions.Tween;
import mx.transitions.easing.*;
import flash.filters.DropShadowFilter;


 

/* each movie clip must have a name "YU"(when created) and instance name like "mc_YU" (done in properties)*/

/* -------------------START----------------for each of the movie clips---------------------------START------------------------ */
mc_YU.onRollOver = function() {
	/* bring to fron movie clip above the rest (only on RollOver) --- code STARTS here ---*/
	_root.x +=2;
	_root.mc_YU.swapDepths(_root.x);
	/* bring to front movie clip above the rest (only on RollOver) --- code ENDS here ---*/
	/*--- scale tween code starts here*/
	var xscTweenOver:Tween = new Tween(this, "_xscale", Elastic.easeOut, this._xscale, 150, 2, true);
	var yscTweenOver:Tween = new Tween(this, "_yscale", Elastic.easeOut, this._yscale, 150, 2, true);
	/*--- scale tween code starts here*/
	/*--- drop shadow filter code starts here*/
	var filter:DropShadowFilter = new DropShadowFilter(15, 45, 0x000000, 0.8,16, 16, 1, 3, false, false, false);
	var filterArray:Array = new Array();
	filterArray.push(filter);
	this.filters = filterArray;
	 /*--- drop shadow filter code ends here */
};
mc_YU.onRollOut = function() {
	/*--- un-scale tween code starts here*/
	var xscTweenOver:Tween = new Tween(this, "_xscale", Elastic.easeOut, this._xscale, 100, 2, true);
	var yscTweenOver:Tween = new Tween(this, "_yscale", Elastic.easeOut, this._yscale, 100, 2, true);
	/*--- un-scale tween code starts here*/
	stopAllSounds;
	/* drop shadow CLEAR filter STARTS here */
	mc_YU.filters =undefined;	
	/* drop shadow CLEAR filter ENDS here*/
};
mc_YU.onRelease = function (){
 getURL("gallery/ama/ama.html")
 };
/* ------------------END----------------for each of the movie clips-----------------------------END-------------------------- */

 stop();

I’m not super sure what you’re talking about, but I’m going with you want the rollout behavior to be seen as you create these clips - or at least as you enter the frame in which they appear? Which I assume is when this script is run.

That’s not hard. All you need to do is set the state to be what it is in rollover (namely scale) and then call rollout. Also, I noticed you’re not calling stopAllSounds() correctly; you’re missing the parens: ().

As far as a tweening array goes, I don’t know, but I know one thing, all these duplicated functions are not something you want to be maintaining. You want to avoid copy and paste code where possible. Don’t duplicate, reuse. Here is where an array definitely becomes handy because you’ll want to loop over your clips to apply these common behaviors. Something like…

import mx.transitions.Tween;
import mx.transitions.easing.*;
import flash.filters.DropShadowFilter;

var shadow:DropShadowFilter = new DropShadowFilter(15, 45, 0x000000, 0.8,16, 16, 1, 3, false, false, false);
var hiliteSize = 150;
var hiliteTime = 2;
var areas = [mc_YU, mc_NW, mc_NU, mc_BC, mc_AB, mc_SK, mc_MB, mc_ON, mc_QC, mc_NB, mc_PE, mc_NS, mc_NF];

for (var i=0, n=areas.length; i<n; i++){
	var area = areas[i];
	
	area.onRollOver = onAreaHilite;
	area.onRollOut = onAreaRestore;
	area.onRelease = onAreaNavigate;
	
	// initial scale & animate into place
	area._xscale = hiliteSize;
	area._yscale = hiliteSize;
	area.onRollOut(); // onAreaRestore
}

function onAreaHilite() {
	_root.x += 2;
	this.swapDepths(_root.x);
	new Tween(this, "_xscale", Elastic.easeOut, this._xscale, hiliteSize, hiliteTime, true);
	new Tween(this, "_yscale", Elastic.easeOut, this._yscale, hiliteSize, hiliteTime, true);
	this.filters = [shadow];
}
function onAreaRestore() {
	new Tween(this, "_xscale", Elastic.easeOut, this._xscale, 100, hiliteTime, true);
	new Tween(this, "_yscale", Elastic.easeOut, this._yscale, 100, hiliteTime, true);
	this.filters = null;
	stopAllSounds();
}
function onAreaNavigate(){
 	getURL("gallery/ama/ama.html");
}

thank you senocular, this is really great solution for part 1, I learned a lot from you.
here is simplified version of my request /problem based on your solution:

what I want to achieve is

  1. each province appears in sequence one after the other and(important)

  2. has a 2 second Tween applied (x/y scale) with easing as in the onRollOver effect.

  3. then once each one of them have finally poped out and formed the Map - THEN ONLY I can use onRollover/rollout actions.

how to do that?
I tried onEnterFrame, onLoad nothing worked

it sounds like you want to set up a sequence that you’d have to chain together with tween complete (or I guess its onMotionFinished) events. Some more info:
http://www.kirupa.com/developer/actionscript/tween.htm

That can get a little tricky. It might instead just be easier to, since I assume these are all on the timeline now? to just space them out and have pop-in code for each of them as part of a class you can assign to each instance which basically runs the tweens on instantiation (i.e. in the constructor). Then at the end of that span of timeline, you can include the loop above assigning the onRollOver and onRollOut events.

Back to your code again:

function onAreaNavigate(){
getURL(“gallery/ama/ama.html”);
}
right now all buttons refer to a single URL, how do you make sure they point to different ones?
:
since this design of the kirupa forum is new to me, how can I share with you the source file?
the resulting effect from your code actually created and explosive(really good) effect, that I would like to share

I would either assign the URLs to the clips themselves and then reference them in the onAreaNavigate function like so…

mc_YU.clickURL = "gallery/ama/yu.html";
mc_NW.clickURL = "gallery/ama/nw.html";
// ...

function onAreaNavigate(){
 	getURL(this.clickURL);
}

or make a map that onAreaNavigate can reference to look up urls using the movie clip’s name:

var urlMap = {
   mc_YU: "gallery/ama/yu.html",
   mc_NW: "gallery/ama/nw.html",
   // ...
};

function onAreaNavigate(){
 	getURL(urlMap[this.name]);
}

You’d probably see the map/lookup approach more in AS3 since its less common to assign arbitrary properties (like the clickURL property I just made up) to objects there, but AS2 is pretty loose, so the first way works fine.

Other things you might do depending on what your URL looks like is make it part of the name. For example I’m assuming the urls are like “yu.html” and “nw.html”. If that’s the case, you don’t need to list them out at all and you can just use something like:

function onAreaNavigate(){
 	getURL("gallery/ama/" + this.name.slice(3).toLowerCase() + ".html");
}

It was pretty common in the AS2 days to pack in data to things like the name for stuff like this. Of course you could also give your clips properties of their own which you could set in the authoring tool… aw man I can’t remember what these were called at first. Ultimately they became components. Smart clips? That might have been it.

oh, as for code sharing, if you can’t do it inline in the forums, then you have to put it somewhere else. Either host it yourself or have a github repo set up for it or something. The only thing you can upload to kirupa (if I remember correctly) are images.

Keep in mind if you have too much code, it could discourage others to take a look at it. I, for example, will rarely if ever download any file to examine it, and will sometimes skip over large code blocks even if they’re posted inline in the forums. Just showing something off (not asking to dive through code) should be fine, but at the same time you have to consider people might not be trusting of obscure URLs. Again, this is where something like github comes in handy.

RE: smart clips

yeah, that was what they were called! I knew I had an example of it too:

http://www.senocular.com/flash/source/?entry=724

Pretty cool stuff for making easily making it so movie clips have adjustable parameters in the authoring tool that you can reference directly in code.

canada mapAS2senocularANd Newv3.swf (169.3 KB)
here is the file:I am trying to upload the actual fla but the size iz bigger than 1024…:frowning:
I will attempt it later

I have managed to make all animations on one frame,
I managed to use delayTime
but when youlook at the swf you notice that only YUKON has required animated Tween upon FrameEntry…whatever I tried, did not work.

hello,
here is the part of code that manages the appearance of each of the movie clips one after another- it works perfectly(with delay of .5 second as required)

however I still did not manage to make sure that the Tween (xscale/yscale +filter shadow) is applied as soon as the movie clip is appearing on the stage(look at the very first Yukon mc to witness)
I am also supplying entire code as txt file

// Time to delay the visibility of the clip
var delayTime = 500;

// Index variable that's used to step thru the array
var step = 1;

// Array to hold clip names
var clipArray = ["mc_YU", "mc_NW", "mc_NU", "mc_BC", "mc_AB", "mc_SK", "mc_MB", "mc_ON", "mc_QC", "mc_NB", "mc_PE", "mc_NS", "mc_NF"];


// Turn visibility off for last 12 clips
mc_NW._visible = false;
mc_NU._visible = false;
mc_BC._visible = false;
mc_AB._visible = false;
mc_SK._visible = false;
mc_MB._visible = false;
mc_ON._visible = false;
mc_QC._visible = false;
mc_NB._visible = false;
mc_PE._visible = false;
mc_NS._visible = false;
mc_NF._visible = false;

// Start an interval to call the showClips 
// function every .5 seconds
var interval = setInterval(showClip, delayTime);

// Function to take care of stepping thru the
// array and turning the visibility on for clips
function showClip()
{
    // Assign the array items to a container variable 
    // to reference the clip on stage
    var clip:MovieClip = clipArray[step];
    
    // Turn the clip's visibility on
    _root[clip]._visible = true;
	_root[clip]._alpha =45;
	
    
    // Increment the step value so it moves to
    // the next item in the array
step++;
    
    // If we've stepped thru all items in the array...
    if(step == clipArray.length)
    {
        // Clear the interval to stop the stepping
        clearInterval(interval);
    }
}

canadamapas2.txt (3.3 KB)

You basically just take whats in the for loop from before and put it in your showClip function.

Ok, I have actually managed everything by now including the lops etc, with one weird problem:
when I click the movieclip to proceed to the next scene(in this case named “secon”)
the movieclip clicked stays on the screen with the second scene showing on the back ground,in addition only double click makes it “work”(i.e. to move to another scene.
this is my code:

function onAreaNavigate(){

mc_YU.onRelease = function(){
//here I am trying to reset the depth to 0, and remove the clip(mc_yu) from the stage…but no success
this.swapDepths(0);
this.removeMovieClip();

gotoAndPlay(“second”, 1);

};
};

Swapping depths (into a positive depth) takes the movie clip out of the control of the timeline so navigating away from where that movie clip exists won’t remove it.

The easiest solution for this is to put those movie clips in another movie clip. Then, when you navigate to another place in the main timeline, since you didn’t swap depths on the new, parent movie clip, it will get removed and take all of the child, depth-swapped movie clips with it.

Note: You’ll have to update your references to those clips being in a container like this.