Posted By


lzyy on 09/15/08

Tagged


Statistics


Viewed 108 times
Favorited by 0 user(s)

htmlText显示图片


/ Published in: ActionScript 3
Save to your folder(s)

让htmlText显示图片,需要设置wordWrap=ture,multiLine=true,vspace=0,hspace=0,width=imgWidth(图片宽度),height=imgHeight(图片高度)


Copy this code and paste it in your HTML
  1. var imgTf:TextField = new TextField();
  2. imgTf.wordWrap = true;
  3. imgTf.multiline = true;
  4. imgTf.height = 100;
  5. imgTf.width = 75;
  6. imgTf.htmlText = "<img src='" + imgurl + "' hspace='0' vspace='0'></img>";

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.