how to use an embedded text file in flash

how to use an embedded text file in flash

ID:24135352

大小:55.00 KB

页数:4页

时间:2018-11-12

how to use an embedded text file in flash_第1页
how to use an embedded text file in flash_第2页
how to use an embedded text file in flash_第3页
how to use an embedded text file in flash_第4页
资源描述:

《how to use an embedded text file in flash》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库

1、HowtouseanembeddedtextfileinFlash  TheopportunitytoeContestendsin20days,andIalreadyshobedatextfileinFlash.  Noetomakesomethingusefuloutofit.  Inthisscript,youethingaboutdynamictextfieldsstyling,inputtextfieldsandarrays.  Allinone.  First,andseeninHobedatextfileinFla

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[感谢阅读

8、这篇文章,..,]

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。