The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.


Results 1 to 12 of 12

Thread: Bigger text than 72pt

  1. #1
    159
    posts
    Registered User

    Bigger text than 72pt

    Hi guys,
    I've made this code:

    Code:
    var txt:TextField = new TextField();
    var frmt:TextFormat = new TextFormat();
    txt.autoSize = TextFieldAutoSize.LEFT;
    frmt.font = "Arial";
    frmt.size = 800;
    frmt.color = 0xFF00FF;
    txt.defaultTextFormat = frmt;
    txt.text = "TRY WITH THIS";
    I've seen aroud the web flash websites with text bigger than the max flash dimension of 72 pt. How can i make that? I've tried with the code above but it seems that flash set the text size to 72....please help me!!!

  2. #2
    try htmlText ....

    Code:
    var t:TextField = new TextField()
    t.textColor=0;
    t.htmlText = '<FONT SIZE="72">Lorem ipsum dolor sit amet.</FONT>';
    t.height=t.textHeight;
    t.width=t.textWidth;
    addChild(t);
    
    var u:TextField = new TextField()
    u.textColor=1343456;
    u.y=150;
    u.htmlText = '<FONT SIZE="160">Lorem ipsum dolor sit amet.</FONT>';
    u.height=u.textHeight;
    u.width=u.textWidth;
    addChild(u);
    http://help.adobe.com/en_US/AS3LCR/F....html#htmlText
    Last edited by Shaedo; July 18th, 2010 at 02:21 PM.

  3. #3
    159
    posts
    Registered User
    Quote Originally Posted by Shaedo View Post
    try htmlText ....

    Code:
    var t:TextField = new TextField()
    t.textColor=0;
    t.htmlText = '<FONT SIZE="72">Lorem ipsum dolor sit amet.</FONT>';
    t.height=t.textHeight;
    t.width=t.textWidth;
    addChild(t);
    
    var u:TextField = new TextField()
    u.textColor=1343456;
    u.y=150;
    u.htmlText = '<FONT SIZE="160">Lorem ipsum dolor sit amet.</FONT>';
    u.height=u.textHeight;
    u.width=u.textWidth;
    addChild(u);
    http://help.adobe.com/en_US/AS3LCR/F....html#htmlText
    Are you sure that there isn't a max value? because i've tried with 160 and i have seen that it's bigger the the 72pt textfield but when i change 160 with 800 or more the font size doesn't change...

  4. #4
    Seems the limit is 96pt for all flash text. Can't even add it to a container and stretch that; you just seem to get a bigger text box... Sorry short of 'breaking it apart' (turn it into a vectored graphic) I don't know a solution . hopefully someone else will

    Just for the record it would be easy enough to send it to PHP, have php turn the text into a graphic and then send the graphic back to flash. Of course that would be wrong for so many ways
    Last edited by Shaedo; July 18th, 2010 at 03:26 PM.

  5. #5
    159
    posts
    Registered User
    Quote Originally Posted by Shaedo View Post
    Seems the limit is 96pt for all flash text. Can't even add it to a container and stretch that; you just seem to get a bigger text box... Sorry short of 'breaking it apart' (turn it into a vectored graphic) I don't know a solution . hopefully someone else will

    Just for the record it would be easy enough to send it to PHP, have php turn the text into a graphic and then send the graphic back to flash. Of course that would be wrong for so many ways
    Of course for a preload like this http://116.ufc.com/ the php method is not good .
    When I've see this i want to reproduce this preload but the first problem is for sure the font size. Because of this i've written this topic.

  6. #6
    159
    posts
    Registered User
    no one?

  7. #7
    280
    posts
    Registered User
    Quote Originally Posted by LS05 View Post
    no one?
    Dunno if this would help you, by turning the Text into a Bitmap, and scaling the Bitmap to become larger.

    txt is my textField, and it is at 72pt sitting on the stage. Then I make it a bitmap and scale it up.

    Code:
    var bitmapData:BitmapData = new BitmapData(txt.width, txt.height, true, 0x00000000);
    bitmapData.draw(txt);
    
    var bitmap:Bitmap = new Bitmap();
    bitmap.bitmapData = bitmapData;
    
    bitmap.smoothing = true;
    addChild(bitmap);
    bitmap.scaleX = 5;
    bitmap.scaleY = 5;
    Last edited by jany; July 19th, 2010 at 10:25 AM.

  8. #8
    159
    posts
    Registered User
    I've tried with this and all works ok
    code:
    Code:
    var txt:TextField = new TextField();
    var frmt:TextFormat = new TextFormat();
    txt.autoSize = TextFieldAutoSize.LEFT;
    frmt.font = "Arial";
    frmt.size = 800;
    frmt.color = 0xFF00FF;
    txt.defaultTextFormat = frmt;
    txt.text = "TRY WITH THIS";
    
    var textHolder:Sprite = new Sprite();
    textHolder.addChild(txt);
    textHolder.scaleX = 10;
    textHolder.scaleY = 10;
    addChild(textHolder);

  9. #9
    280
    posts
    Registered User
    Great!

  10. #10
    159
    posts
    Registered User
    Quote Originally Posted by jany View Post
    Great!
    it is so simply that i'm surprised

  11. #11
    Quote Originally Posted by LS05 View Post
    I've tried with this and all works ok
    code:
    Code:
    var txt:TextField = new TextField();
    var frmt:TextFormat = new TextFormat();
    txt.autoSize = TextFieldAutoSize.LEFT;
    frmt.font = "Arial";
    frmt.size = 800;
    frmt.color = 0xFF00FF;
    txt.defaultTextFormat = frmt;
    txt.text = "TRY WITH THIS";
    
    var textHolder:Sprite = new Sprite();
    textHolder.addChild(txt);
    textHolder.scaleX = 10;
    textHolder.scaleY = 10;
    addChild(textHolder);

    Quote Originally Posted by Shaedo View Post
    Can't even add it to a container and stretch that; you just seem to get a bigger text box...
    oh I swear I tried that and it did not work for me; apparently adding the TextFormat is essential to allow it to be stretched. Excellent that it worked for you!

    Just as a final note now you have a solution; the UFC preloader came up in forum question about a year ago and as I remember it someone apparently stripped it out and found that they were using sprites of numbers rather than text.
    Last edited by Shaedo; July 19th, 2010 at 04:53 PM.

  12. #12
    159
    posts
    Registered User
    Quote Originally Posted by Shaedo View Post
    oh I swear I tried that and it did not work for me; apparently adding the TextFormat is essential to allow it to be stretched. Excellent that it worked for you!

    Just as a final note now you have a solution; the UFC preloader came up in forum question about a year ago and as I remember it someone apparently stripped it out and found that they were using sprites of numbers rather than text.
    mmm i nevere tried that...if you have some code or reference i will thank you

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012