Hi,
I seem to be going round in circles trying to dynamically reference an MC.
I have the following instance
I keep getting the following error when trying to dynamically reference it
I've tried several different syntax but cannot get it right...this is what i am trying to do
the arguments i'm passing is
So the code should hide all instances for the rewind button and then show the one given by the argument.
What am I doing wrong?
Thanks,
1DMF.
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Google Rank Extractor -> Perl beta with FusionCharts
I seem to be going round in circles trying to dynamically reference an MC.
I have the following instance
Code:
_root.rewindButton.rewindOverNew
I keep getting the following error when trying to dynamically reference it
**Error** Scene=Scene 1, layer=actions, frame=1:Line 657: Expected a field name after '.' operator.
_root[ but + "Button"].[but + buts[x]]._visible = false;
**Error** Scene=Scene 1, layer=actions, frame=1:Line 660: Expected a field name after '.' operator.
_root[ but + "Button"].[but + eff]._visible = true;
I've tried several different syntax but cannot get it right...this is what i am trying to do
Code:
function showButton(but:String,eff:String){
var buts:Array = new Array("Up","UpNew","Over","OverNew","Down","DownNew","Release","ReleaseNew");
for (x = 0; x<=7; x++){
_root[ but + "Button"].[but + buts[x]]._visible = false;
}
_root[ but + "Button"].[but + eff]._visible = true;
}
Code:
showButton("rewind","OverNew");
So the code should hide all instances for the rewind button and then show the one given by the argument.
What am I doing wrong?
Thanks,
1DMF.
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Google Rank Extractor -> Perl beta with FusionCharts