Latest Updates: flash RSS

  • Embedding fonts with code

    Ellen 16:29 on April 27, 2010 | 0 Permalink | Reply
    Tags: flash, unicodeRange

    Embedding your fonts by code, you enter this code into an fla:

    [Embed( systemFont="Arial", fontName="arialBold" , fontWeight= "bold" ,
    mimeType="application/x-font", unicodeRange="U+0020-U+007E,U+00A1-U+00FF,U+2000-U+206F,U+20A0-U+20CF,U+2100-U+2183,U+0100-U+01FF, U+1E00-U+1EFF;")]
    var arialBold:Class;
    Font.registerFont(arialBold);

    Export your fla preferably with the name of the font and load it into you Flash application. “arialBold” is the identifier used in your classes after loading in your font swf. When you add your font properties to your text field the following code is used:

    var textField:TextField = new TextField();
    textField.embedFonts = true;
    var textFormat:TextFormat = new TextFormat();
    textFormat.font = "arialBold";
    textFormat.bold = true;
    textFormat.color = 0×000000;
    textFormat.size = 12;
    textField.selectable = false;
    textField.width = 300;
    textField.multiline = true;
    textField.wordWrap = true;
    textField.autoSize = TextFieldAutoSize.LEFT;
    textField.defaultTextFormat = textFormat;
    textField.text = "Your text here";

    To get the specific unicode range for your project you can input your characters and convert them with the help of the Unicode range tool.

    These are the most common unicode ranges I use:

    //Basic Latin
    //Characters: !"#$%&’()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
    U+20-U+7E
    //Latin-1 Supplement
    //Characters:  ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ
    U+20,U+A1-U+FF
    //Latin Extended-A
    //Characters: ĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃ
    //ńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſ
    U+100-U+17F

  • Site pal: 3d mapping on faces

    Ellen 16:43 on December 8, 2009 | 0 Permalink | Reply
    Tags: 3D, flash, Site pal

    Site Pal lets you add a speaking face to your website. Even Barack Obama… You can upload your own image to create a 3D avatar moving and talking with different face expressions. The company Site Pal took experiences from the gaming industry and put it into a 3D engine made in Flash. The facial expressions are quite impressing.

    I tried it out with an image I uploaded:

    See more on: http://www.sitepal.com/

c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
esc
cancel