A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: I need help embedding foreign characters

  1. #1
    Member
    Join Date
    Feb 2009
    Posts
    49

    I need help embedding foreign characters

    Hey guys,

    I'm trying to embed a handful of European language characters into a little flash news ticker (Swedish, Norwegian and some others).

    I'm embedding my swf file in the html and passing a FlashVars variable
    This is the text that the ticker displays.

    For some reason the swf doesn't render the character when I put a foreign character such as å, Å, ä, Ä, ö, Ö in the HTML. I have embedded all these fonts in the dynamic text box in my .fla

    Attached is the .fla and .html file where you can input the text for the swf to display. Please have a look for me! (attached zip at bottom of post)

    Thanks.




    PHP Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <
    html xmlns="http://www.w3.org/1999/xhtml">
    <
    head>
    <
    meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <
    title>Flashvars Example</title>
    </
    head>

        <
    body>
            <
    p>
                <
    object width="728" height="36" type="application/x-shockwave-flash" data="newsticker.swf">
                    <
    param name="flashvars" value="total=3&speed=2&text1=ä Ã¥ Ã© Ã¶ Ã„ Ã…&text2=test&text3=test&url1=http://www.cnn.com&url2=http://www.google.com&url3=http://www.bbc.com"/>
                </
    object>
            </
    p>
        </
    body>
    </
    html

    PHP Code:
    var paramObj:Object LoaderInfo(this.root.loaderInfo).parameters;
    var 
    myWidth:Number;
    var 
    timer:Timer = new Timer(10001);
    var 
    speed:int paramObj["speed"];

    stage.scaleMode StageScaleMode.NO_SCALE;

    ticker_mc.feedback_txt.background false;
    ticker_mc.feedback_txt.border false;
    ticker_mc.feedback_txt.autoSize TextFieldAutoSize.LEFT;
    //ticker_mc.feedback_txt.width = 728;
    ticker_mc.feedback_txt.stage.stageWidth;

    timer.addEventListener(TimerEvent.TIMERtimerResult);      
    ticker_mc.feedback_txt.addEventListener(Event.ENTER_FRAMEonEnter);
    ticker_mc.feedback_txt.addEventListener(MouseEvent.MOUSE_OVERonOver);
    ticker_mc.feedback_txt.addEventListener(MouseEvent.MOUSE_OUTonOut);

    timer.start();

    for (var 
    i:int=1<= paramObj["total"]; i++) {
        
    ticker_mc.feedback_txt.htmlText += "<a href=\"" paramObj["url"+i] + "\" target=\"_self\">" paramObj["text"+i]+ "</a>.....";
    }

    function 
    timerResult(e:TimerEvent):void {
        
    myWidth ticker_mc.feedback_txt.width;
    }

    function 
    onEnter(e:Event):void {
        
    ticker_mc.feedback_txt.-= speed;
        if (
    ticker_mc.feedback_txt.< (myWidth*-1)) {
            
    ticker_mc.feedback_txt.stage.stageWidth;
        }
    }

    function 
    onOver(e:MouseEvent):void {
        
    speed 0;
    }

    function 
    onOut(e:MouseEvent):void {
        
    speed paramObj["speed"];

    dynamic text field. Include these characters: ä Ã¥ é ö Ä Ã… É Ö á Ã* ą b' ć dź dż é è ę ł m' ń ó p' ś w' z ź ż" Ą Ć Ę Ł Ń Ã“ Ś Ź Ż Ã¥ æ â ê ø ò ô ’ „ ” « » – — Ã… Æ Â É È Ê Ø Ã’ Ô ф б в г д ё ж з и й к л м н о п р с т у ф х ц ч ш щ ъ ы ь э ю я
    Attached Files Attached Files
    Last edited by rogueblade; 11-23-2010 at 06:46 AM.

  2. #2
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    Works for me, but I had to repair your html file. There were no characters/foreign letters
    - The right of the People to create Flash movies shall not be infringed. -

  3. #3
    Member
    Join Date
    Feb 2009
    Posts
    49
    Weird, I just realized if I view the page source my HTML looks like this:
    code:
    <param name="flashvars" value="total=3&speed=2&text1=Foreign Characters here: �, �, �, �, �, �&text2=test&text3=test"/>


    Quite likely part of the problem......:S

    When editing in notepad++ I just paste the foreign characters in but the page source turns them out like �.
    Weird
    Last edited by rogueblade; 11-24-2010 at 11:48 AM.

  4. #4
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    The file you posted looked the same. That was the problem.
    - The right of the People to create Flash movies shall not be infringed. -

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