Hello all
I'm loading external vars from a txt file into texboxs. I also have movieclips that might be visible or invisible.
The problem is that I want to be able to have cases when some especific vars are loaded, a case in wich nothing is loaded and another case for everything else.
What I have right now is this:
(etc, etc...)
switch (this.test) {
case "ABC 123" :
_root.A_mc._visible = true
break;
case "ABC 456" :
_root.A_mc._visible = true
break;
case "ABC 789" :
_root.A_mc._visible = true
break;
case "DEF 123" :
_root.B_mc._visible = true
break;
case "DEF 456" :
_root.B_mc._visible = true
break;
case "DEF 789" :
_root.B_mc._visible = true
break;
CASE "" :
_root.A_mc._visible = false
_root.B_mc._visible = false
break;
DEFAULT :
_root.C_mc._visible = true
The ' case "" ' doesn't work. I'm not sure if it's possible to return the null value.
I also would like to know if I can group the variables that starts with the same letters, like ABC... and DEF... like case "ABC"+ (something...)
Thx in advance
Keish
I'm loading external vars from a txt file into texboxs. I also have movieclips that might be visible or invisible.
The problem is that I want to be able to have cases when some especific vars are loaded, a case in wich nothing is loaded and another case for everything else.
What I have right now is this:
(etc, etc...)
switch (this.test) {
case "ABC 123" :
_root.A_mc._visible = true
break;
case "ABC 456" :
_root.A_mc._visible = true
break;
case "ABC 789" :
_root.A_mc._visible = true
break;
case "DEF 123" :
_root.B_mc._visible = true
break;
case "DEF 456" :
_root.B_mc._visible = true
break;
case "DEF 789" :
_root.B_mc._visible = true
break;
CASE "" :
_root.A_mc._visible = false
_root.B_mc._visible = false
break;
DEFAULT :
_root.C_mc._visible = true
The ' case "" ' doesn't work. I'm not sure if it's possible to return the null value.
I also would like to know if I can group the variables that starts with the same letters, like ABC... and DEF... like case "ABC"+ (something...)
Thx in advance
Keish