Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inputtext variable assign

Status
Not open for further replies.

BjMcQueen

Technical User
Mar 12, 2007
1
GB
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?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top