6 Replies Latest reply on Oct 26, 2006 1:07 PM by

    Passing text to flash from JavaScript

      Hi guys,

      I have never worked with flash before so please excuse my newbieness.

      I need to pass characters from JavaScript to flash that do not appear in latin alphabet. For example é (if you don't see it its e with an accent, same as é, %E9, é)
      In JavaScript I set flashVars attribute to "titleText=%E9" and also tried "titleText=%C3%A9".

      In flash I have this:

      textClip.title_txt.autoSize = true;
      textClip.title_txt.multiline = false;
      textClip.title_txt.html = true;
      textClip.title_txt.wordWrap = false;

      textClip.title_txt.htmlText = unescape(titleText);

      All I get is blank. I tried putting unescape("%E9") and unescape("%C3%A9") directly in flash but that didn't work. Also on flash movie text field, under Embed options I selected "All "39477 glyphs)" and tried changing "Render text as HTML" option, still nothing. Maybe I am not embeding characters properly?

      Thank you.
        • 1. Re: Passing text to flash from JavaScript
          .:}x-=V!P=-x{:. Level 3
          in the embed panel there is a input text field where you can define other characters to embed you need to put the special characters there
          1 person found this helpful
          • 2. Re: Passing text to flash from JavaScript
            I tried to do it by specifying é character but it didn't work. Also I can't really use this solution because this flash will be used on sites with different languages so there possibly be hundreds of special characters.
            • 3. Passing text to flash from JavaScript
              anonymous thing Level 1
              try to use French charset in your HTML, ISO-8859-1, or maybe the extended one(I never tried it), ISO-8859-15

              if it's really not working try UTF-16
              1 person found this helpful
              • 4. Re: Passing text to flash from JavaScript
                I tried setting character encoding for the page (including HTTP response) to UTF-8 but that didn't help
                • 5. Passing text to flash from JavaScript
                  TimSymons Level 1
                  Use the Embed... button in the Properties box. You should CTRL click on each of the following:

                  Uppercase
                  Lowercase
                  Numerals
                  Puntuation
                  Basic Latin
                  <now scroll down a little and CTRL click on the following>
                  Latin I
                  Latin Extended A
                  Latin Extended B
                  Latin Extended Add'l

                  These will encompass what you need. And just so you know, the e with an accent is part of Latin extensions for fonts.

                  <Just reread your post and saw you added all characters.>

                  Make sure that your textfield is set to dynamic or input and that you have the correct instance name in your code. Also, make sure that the font you are using supports the characters you are trying to add. Not all fonts contain all characters. To make sure that you have a good font use Arial or Verdana for testing, then you can try other fonts. Or for a shorter way to see if the font supports the characters you can use the Character Map program on Windows. It is under the Start button.

                  Start -> Programs -> Accessories -> System Tools -> Character Map

                  <One more edit :-) >

                  I tried using %E9 with no luck. I had to use the %C3%A9 to get the character to appear.


                  Tim
                  • 6. Re: Passing text to flash from JavaScript
                    THANK YOU VERY MUCH, IT'S WORKING

                    The problem was with selection of embeded glyphs. When I included latin languages everything worked fine.