Newbie Design Question
I am trying to create a little application for my web project that would allow an user to type some text into a box, press a search button, and be supplied with a hyperlink on which they can click and be referred to the link. I have tried really hard to alter the code I have currently but for some reason I can't make the link a hyperlink...what do I have to change?
var directory:Array = [{Input:"A", Output:"www.abc.com"}, {Input:"B", Output:"www.bcd.com"}, {Input:"C", Output:"www.cde.com"}];
function getOutputByInput(Input:String):String {
for(var i:Number = 0; i < directory.length; i++) {
if(directory.input.toLowerCase() == input.toLowerCase()) {
return directory.Output;
}
}
return "No Match";
}
searchButton.onRelease = function() {
resultField.text = getOutputByInput(inputField.text);
}
Thanks in advance for your help!
I know there's the getURL function but I don't know how to incoporate everything...I just want the result to come up as a hyperlink and not just text.