Flash AS 2 One global variable updates fine in a Symbol the other not...
Flash makes my brain melt. I really have no ide whats going wrong -.-
I have two global variables:
_global.IsGreat = 0;
_global.Bronze = 0;
Both are updatet in my Maincode...
The working one:
| if (Maske._y <= DrittelMaske) | |||
| { | |||
| _global.Bronze = 1; | |||
| trace ("Bronze " + Bronze); | |||
| Mask_n_v._alpha = 0; | |||
| Mask_s_v._alpha = 0; | |||
| Mask_m_v._alpha = 100; | |||
| Schnell = 0; | |||
| //Normal._alpha = 0; | |||
| //Mittel._alpha = 100; | |||
| //Schnell._alpha = 0; | |||
| } |
The Symbol that reacts...
if (_global.Bronze == 0)
{
gotoAndPlay (1);
}
else
{
gotoAndPlay (3);
}
| if (player._y <= PlayerLowest) //Best Position! | |||||
| { | |||||
| IsGreat = 1; | |||||
| trace ("IsGreat " + IsGreat) | |||||
| } | |||||
- In the Mainscene "IsGreat" gets an update and changes to 1 when the Position is reached... But no alternate Animation from frame 10 of the symbol is played...
In the Symbol that doesn't react
| if (_global.IsGreat == 0) | ||
| { | ||
| gotoAndPlay (1); | ||
| } | ||
| else | ||
| { | ||
| gotoAndPlay (10); | ||
| } |
I had it onece in a while that I had to delete and paste code in aain that flash got it that I changed something... but this isn*t working at ALL!
I don't get what the problem is.
Both variables are updating in the maincode just fine. But the "new" global" doesn't want to update...
I am glad for any helü. I had this "updating" problem several times the last days and I really have no idea what I have to do that the codes get the link between the symbol and the code