I am trying to create a music jukebox however have come across a problem. i use the following code attached to a button to load songs dynamically
on(press){
gotoAndPlay(11);
_root.SONGA = new Sound();
_root.SONGA.loadSound(A);
_root.SONGA.onSoundComplete = function() {
_root.playing=false;
_root.paused=false;
_root.stopped=true;
_root.SONGAPosition = 0;
_root.SONGAPositionText = 0;
};
}
which works fine, however i want to add an if and else process
IF THE INPUT BOX HAS "blank.mp3" written in i want the following code to happen
ELSE i would like it to gotoandplay(10) and trace "File not found"
I have tried several codes but always encounter errors, i think the problem is i have no idea how to assign the inputtext area as a variable and then say that when that variabel equals "blank.mp3" do something.
Can anybody help?
on(press){
gotoAndPlay(11);
_root.SONGA = new Sound();
_root.SONGA.loadSound(A);
_root.SONGA.onSoundComplete = function() {
_root.playing=false;
_root.paused=false;
_root.stopped=true;
_root.SONGAPosition = 0;
_root.SONGAPositionText = 0;
};
}
which works fine, however i want to add an if and else process
IF THE INPUT BOX HAS "blank.mp3" written in i want the following code to happen
ELSE i would like it to gotoandplay(10) and trace "File not found"
I have tried several codes but always encounter errors, i think the problem is i have no idea how to assign the inputtext area as a variable and then say that when that variabel equals "blank.mp3" do something.
Can anybody help?