2、shpost,youneedtoembedthetextfilethistimeIamusingamaseparatedfile,likethis:aa,aah,aahed,aahing,...,zymurgy,zyzzyva,zyzzyvas andIamembeddingitinthesameoldport flash.utils.ByteArray; // assuming that e of your text file // and it's stored in the same directory of your
3、 flash file [Embed(source="imeType="application/octet-stream")] public class embedded_text extends ByteArray { public function embedded_text() { } }} Noainfileeyouhavetoport flash.display.Sprite; import flash.text.TextField; import flash.text.TextFieldType; impor
4、t flash.text.TextFormat; import flash.events.Event; public class porting the text file var bedded_text = nebedded_text(); // creating a neat var text_format:TextFormat = neat(); // the array aking it an input text text_field.type=TextFieldType.INPUT; // defi
5、ning its size and position text_field.x=20; text_field.y=20; text_field.at text_field.background=true; text_field.text="at.color=0x000000; text_format.size=24; text_field.setTextFormat(text_format); // splitting the text file removing the mas "," /
6、/ and inserting words into the array words_array=words.toString().split(","); // listener for the text to change text_field.addEventListener(Event.CHANGE,on_input); } public function on_input(e:Event) { // looking for the position of the text field content
7、 // into the array of words var position:int=word12下一页[感谢阅读这篇文章,..,]s_array.indexOf(text_field.text); if (position>-1) { // if the ethinginthetextareaandifitsavalidname="src"value="2009_10/136066.satchisthateasynoeandgrabtheprize. 本文示例源代码或素材下载上一页12[感谢阅读