Using symbol from library in htmlText

后端 未结 3 481
攒了一身酷
攒了一身酷 2020-12-22 08:39

Problem is this: I need to add image to textField using img tag, but I cannot reference a symbol from a library in my swf file.

txt.htmlText =  \"test 

        
3条回答
  •  半阙折子戏
    2020-12-22 09:15

    //Displays img on stage. No text is necessary
    var txt:TextField = new TextField ();
    txt.wordWrap = true;//this is necessary or img won't display
    txt.width = 400;//size up to avoid cutting off image
    txt.height = 200;//this doesn't affect the image size or proportion
    txt.htmlText = '';
    addChild(txt);
    

提交回复
热议问题