Hello -
anyone have any idea how i might go about making this a little more managable?
i have about 40 “buttons” that all run the same way -
[list]
[]set a unique variable to true on rollover and false on rollout
[]on rollover check every frame to see if its still onrollover and move the the timeline of the mc calling this function accordinglly (perfect tween - ch8, flash to the core)
[*]and so on
[/list]i can pass everything i need to get this doen to one generic function except the actual name of the _root.uniqueVAR - so all i came up with was this insane if/else stuff –
any ideas on how to clean up this mess?
many many thanks in advance -
About Button:
on(rollOver){
[color=DarkRed]**_root.aboutVAR**[/color]=true;
this.overme("aboutVAR");
}
on(rollOut){
_root.aboutVAR=false;
}
Products Button:
on(rollOver){
[color=DarkRed]** _root.productVAR**[/color]=true;
this.overme("productVAR");
}
on(rollOut){
_root.productVAR=false;
}
TimeLine AS:
MovieClip.prototype.overme=function(jumbo){
if ((jumbo=="aboutVAR")&&(_root.transStatus!="about")&&(_root.transActive!="2")){
this.onEnterFrame=function(){
if (**[color=DarkRed]_root.aboutVAR[/color]**) {
this.nextFrame();
} else if ((**[color=DarkRed]_root.aboutVAR[/color]** != true) && (this._currentframe<=1)){
delete this.onEnterFrame;
}else if ((**[color=DarkRed]_root.aboutVAR[/color]** !=true)&&(_root.transStatus!="about")){
this.prevFrame();
}
}
//START PRODUCTS///////////////////////////////////////////////////////////
}else if ((jumbo=="[color=Black]productVAR[/color]")&&(_root.transStatus!="products")&&(_root.transActive!="2")){
this.onEnterFrame=function(){
if (**[color=DarkRed]_root.productVAR[/color]**) {
this.nextFrame();
} else if (([color=DarkRed]**_root.productVAR**[/color] != true) && (this._currentframe<=1)){
delete this.onEnterFrame;
}else if ((**[color=DarkRed]_root.productVAR[/color]** !=true)&&(_root.transStatus!="products")){
this.prevFrame();
}
}
};