A Flash Developer Resource Site

Results 1 to 1 of 1

Thread: happy new year not apply external font

  1. #1
    Senior Member
    Join Date
    May 2016
    Posts
    451

    happy new year not apply external font

    hello all

    first, happy new year

    in swishmax actionscript 2 i have this code


    PHP Code:
    onFrame (1) {
        
    stop();
    import TextField.StyleSheet;
    this.createTextField("news_txt"9991010500240);
    news_txt.multiline true;
    news_txt.wordWrap true;
    news_txt.html true;
    var 
    my_styleSheet:StyleSheet = new StyleSheet();
    my_styleSheet.onLoad = function(success:Boolean) {
    if (
    success) {
    news_txt.styleSheet my_styleSheet;
    news_txt.htmlText "<p> hello world<p>"+newline +newline +"<h1>happy new year </h1>";                     
    }
    };
    my_styleSheet.load("my_CSS.css");


    and the code in the external css file is


    PHP Code:
    {
    text-aligncenter;
    text-decorationunderline;
    font-familyArial;
    font-size20px;
    color#FF0000;
    }
    h1 {
    text-aligncenter;
    text-decorationnone;
    font-familyDIN;
    srcurl(DIN.ttf);        
    font-size30px;
    color#0000FF;
    font-weightRegular;



    but the font not working in my file

    how can i solve this problem
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center