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();