I want a global var for selecting sounds (0 = no sound, 1 = loop1, 2 = loop2,…). a mc indicates what sound is selected but that mc
doesnt do anything:
Main Timeline
Action Keyframe 1 (only one frame):
_global.SoundLfo1 = 0;
Sub.Sub.Sub Button
Action in the Button:
on (press) {
if (_global.SoundLfo1 = 0 ) {
this.attachMovie(“wave”, “waveactive”, 5);
}
}
i cant see any wave
if i delete the if thingy i can see the wave…
there is lots a code missing for the sound implementation but
if this _global doesnt work i doesnt want to push it forward
anymore…:*(
yes…
its a comon mistake of lot of people… using asign (=) insted of equalation test (==)… actualy I do this mstake often to… you get a zero in your if statment and c language like pprograms stati it ash FALSE.
hare is one trick… : use::
if ( 0 == _lobal.SoundLfo1){}
…
if you mis and tipe
if ( 0 = _lobal.SoundLfo1){} ypu get an error as you cant asign value to a number…