Hi, I'm new to Hype and coding, I have a Flash project that I want to replicate in Hype, it's a 'search button- text input' to go to specific fame and display the fame, there is a back button on each frame so a new frame number can be searched for. Regards. Brad
Code is:
var i:int = 0;
var names:Array = new Array("1","2","3");
var frames:Array = new Array("2","3","4");
text_in.text = "Type Here";
searchbutton.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler);
function fl_MouseClickHandler(event:MouseEvent):void
{
findInArray(text_in.text);
gotoAndStop(frames[i]);
}
function findInArray(str:String):int
{
for(i = 0; i < names.length; i++)
{
if(names[i] == str)
{
return i;
}
}
return 0;
}