TwelvestoneFlash

HTML in dynamically created textfield


Sign in

  • Waiting for Godot ( 730 k posts )
    Just conversation.
  • Thunder Dome ( 23 k posts )
    Photoshop Tennis and Collabs.
  • Photography ( 5.1 k posts )
    For all you shutterbugs, sh...
  • Flash ( 18 k posts )
    ActionScripting to tweens, ...
  • Front End ( 5.9 k posts )
    general front end design an...
  • Back End ( 9.7 k posts )
    serverside scripting, progr...
  • Projects and Theory ( 12 k posts )
    This forum is for discussio...
  • FAQ ( 269 posts )
    All those nagging questions...
  • Design ( 17 k posts )
    graphics & all aspects of g...
  • Purgatory ( 3.6 k posts )
    12stone Jail, feel free to ...
Big Ern
 
2010-03-04

Right, why doesn't this work??

        var myFont = new MyriadPro();

        var _displayTextFormat:TextFormat = new TextFormat();
        _displayTextFormat.size = 15;
        _displayTextFormat.font = myFont.fontName;

        var _displayText:TextField = new TextField();
        _displayText.defaultTextFormat = _displayTextFormat;
        _displayText.embedFonts = true;
        _displayText.antiAliasType = AntiAliasType.ADVANCED;
        _displayText.border = false;
        **_displayText.htmlText = "hello<br />hello";** //_springModel.displayText;
        _displayText.width = 170;
        _displayText.height = 250;
        _displayText.x = 270;
        _displayText.y = 80;
        _displayText.wordWrap = true;
                    this.addChild( _displayText );

font works, it's positioned properly, wordwrap works, but it's not recognising the "". W-T-F

Apparently the _displayText.html = true doesn't work anymore... what am I missing?!

[Paul Ferrie]
 
2010-03-04

i think you might need multiline set in there. Try adding _displayText.multiline=true

Big Ern
 
2010-03-04

Thank you Paul, that was driving me mad. I thought multiline was set to true by default in as3.

STUPID ME.

[Paul Ferrie]
 
2010-03-04

No idea m8 but glad it's working for you k

Sorry, you must be a member to post to a conversation. Either log in or sign up to get involved.
TwelvestoneFlash

HTML in dynamically created textfield