actionscript 3 - How To Link To A Frame Adobe Flash CS6 Action Script 3 -
i need adobe flash assignment , m still new adobe flash :( how tell user if input wrong keyword how link them frame .
var i:int = 0; var names:array = new array("html","head","body"); var frames:array = new array("6","7","8"); searchhtmlll.text =""; searchhtml.addeventlistener(mouseevent.click, fl_mouseclickhandler_2); function fl_mouseclickhandler_2(event:mouseevent):void { findinarray(searchhtmlll.text); gotoandstop(frames[i]); } function findinarray(str:string):int { for(i = 0; < names.length; i++) { if(names[i] == str) { return i; } } return 0; }
i answering based on whatever limited information have provided in question, , understand.
your method findinarray
has return type of int
, calling without assigning variable.
so code should be:
var result:int = findinarray(searchhtmlll.text); gotoandstop(frames[result]);
hope helps.
Comments
Post a Comment