[COLOR=#000000][FONT=verdana]I hope u can help me again!!! There’re buttons that need to scale at max when rollover but they appear ones back of anothers. Tried the swapDepths method for buttons:
[/FONT][/COLOR]
Button.prototype.swapDepths = MovieClip.prototype.swapDepths;
this.onRollOver = function():Void{
origDepth = this.getDepth();
this.swapDepths(_root.getNextHighestDepth());
}
this.onRollOut = function():Void{
this.swapDepths(origDepth);
}
[COLOR=#000000][FONT=verdana]but when rollOut the rollOver instance of the button remains visible and so on for each button.[/FONT][/COLOR]
[COLOR=#000000][FONT=verdana]I started a search and found that its better if u use swapDepths with movieclips instead of buttons. I changed the buttons to movieclips and the code is working perfectly for the swapDepths but when i try an onRelease function in timeline or on(release) in the mc, the actions doesnt work. When is used in the buttons it works perfectly but not the swapDepths.[/FONT][/COLOR]
[COLOR=#000000][FONT=verdana]The code im using works to populate a list and i cant figure out what is wrong. Here is the code that im using on realeses:
[/FONT][/COLOR]
for(var i:Number=0;i<11;i++)
{
var visibleCheck:String = new String("textMC"+i);
var visibleCheck:String = new String("x"+i);
if(this[visibleCheck]._visible==false)
{
this["textMC"+i]._visible=true;
this["textMC"+i].txtbox.text="eggs";
this["textMC"+i].image_mc.loadMovie("images/eggs.png");
this["textMC"+i].prot.text="9";
this["textMC"+i].carb.text="8";
this["textMC"+i].fat.text="2";
this["textMC"+i].sugar.text="4";
this["x"+i]._visible=true;
calculate();
return;
}
}
[COLOR=#000000][FONT=verdana]Also added a link to my project for better understanding of the whole code.
Pretty please help me!!![/FONT][/COLOR]:puzzle: