Welcome to WebmasterWorld Guest from 107.22.14.254

Forum Moderators: not2easy

Message Too Old, No Replies

Flash MX and special characters

Having trouble

     
2:11 pm on Jan 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm trying to get Flash MX to show the & character. Tried to write it normally, tried octal, tried hexadecimal, nothing works. Did I miss something?

Thanx
Sinner

8:28 am on Jan 11, 2003 (gmt 0)

WebmasterWorld Senior Member mivox is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Have you tried &? That's what I use in xhtml.
2:26 pm on Jan 11, 2003 (gmt 0)

WebmasterWorld Senior Member korkus2000 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Where are you using it that it doesn't work. Works fine for me in regular text.
7:28 am on Jan 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



AFAIK & works only for HTML and the like.

First I tried to use it in an import from a text file. When that didn't work, I tried an actionscript to replace variable e.g. 'BlackWhite' by 'Black&White' in the Flash file itself. No success either. Strangely, most characters work, just not characters with octal codes from 041 to 047.

12:40 pm on Jan 13, 2003 (gmt 0)

WebmasterWorld Senior Member korkus2000 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



In actionscript & is the concatination character. No luck there. When you are pulling from a text file it is part of the name value pairs so it is not allowed. I believe there is a code for it but don't know off hand. I will take a look and let you know.
12:44 pm on Jan 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks Korkus, but if the code you're talking about is the \octal, then it doesn't work for me...

<added>Had to search for the exact code: \046, which doesn't work. Also \u0026 (unicode) got me nowhere. Tried both in the text file and in the actionscript.

1:08 pm on Jan 13, 2003 (gmt 0)

WebmasterWorld Senior Member korkus2000 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Try %26. Its like URL encoding with ASCII. It should work if you place it directly in the text file. You can use all the % ASCII codes in flash text files.
1:29 pm on Jan 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I get Black26White... (text file as well as flash file)
1:34 pm on Jan 13, 2003 (gmt 0)

WebmasterWorld Senior Member korkus2000 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Here is Macromedia's page about it.
[macromedia.com...]

If you are using MX then you can also use unicode stuff. %26 works fine here. Look through that page and see if maybe you have missed a setting or something.

2:01 pm on Jan 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I saw this page before too. And their example doesn't work for me. In fact, nothing works with the %.
2:04 pm on Jan 13, 2003 (gmt 0)

WebmasterWorld Senior Member korkus2000 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



What version of Flash are you using? This is really strange. Are you making this from an example? If so what example? Also try just a name value pair with % codes and nothing else.
2:24 pm on Jan 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Using Flash MX (6.0). Not an example, it is a flash navigation (before everybody starts yelling, it's just an optional navigation, the user can turn it off and navigate by normal HTML links ;)). Strage thing is that other special characters like the french accents are no problem.

name value pair? Either my english or my flash knowhow can't follow you.

2:35 pm on Jan 13, 2003 (gmt 0)

WebmasterWorld Senior Member korkus2000 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



This is a name value pair that is in the text file but usually seen in query strings.
name=value

make a text file and call it in to flash with 1 name value pair like:

test=%26

see if it works or not.

2:54 pm on Jan 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I see what you mean now. But it doesn't work, I get back a nice '26' :(.

I don't think it has anything to do with the text file itself or the import. As written above, even if I try to replace the 'BlackWhite' by a 'Black&White' in the flash file, it won't show. Same for 'Black%26White'.

2:55 pm on Jan 13, 2003 (gmt 0)

WebmasterWorld Senior Member korkus2000 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



What operating system are you using? Do you know what character encoding it uses?
3:03 pm on Jan 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Win2k. Not sure what encoding it uses, but as I can enter the & character as static text in the movie, that should not be the problem.

I get the feeling all possible sources for that problem are being eliminated one after the other. :(

3:09 pm on Jan 13, 2003 (gmt 0)

WebmasterWorld Senior Member korkus2000 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



try Black+%26+White
3:14 pm on Jan 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Black26White. Again.
3:16 pm on Jan 13, 2003 (gmt 0)

WebmasterWorld Senior Member korkus2000 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



There is something wrong with your % sign. Try %25 which is a % sign.

Black+%26+White is giving you Black26White? You should at least get a space in front and behind the 26? This is really odd.

3:29 pm on Jan 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Black%25White gives Black25White.
3:30 pm on Jan 13, 2003 (gmt 0)

WebmasterWorld Senior Member korkus2000 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Can you post the entire text file with any widgetization needed.
4:08 pm on Jan 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ok, this is the text file (called models.as):

var models = new Array(

"widget1:1 widget",
"widget2:2 widgets",
"widget3:3 widgets",
"widget3a:3 widgets black&white",
"widget4:4 widgets",
"widget4a:4 widgets déjà vu",
"widget4b:4 widgets black&white"

);

It is imported by the following command from the .fla file:

#include "models.as"

And used by this variable:

modelFont.Description = getModel(modInt,langPos);

which is a variable for a dynamic text.
The getModel function is used to separate between the languages the site is in. I delete them here, but they would just be another : followed by the text in that language.

Hope I didn't delete too much while widgetising.

6:17 pm on Jan 13, 2003 (gmt 0)

WebmasterWorld Senior Member korkus2000 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I didn't know you were using action script in the text file. Give &amp; a try. & is going to cause problems in the action scripting. You are basically concatinating the strings in your file.
7:37 am on Jan 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Already tried it. Shows BlackampWhite... Even tried %26amp;. Guess what it shows :(.
8:11 am on Jan 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



GOTCHA!

What happened was that the embedded font was not set in the right way. If you go to the field where the text is used and open the Properties window, next to the variable name, you have a button 'Character...' where you can choose the character options. There you can choose which font outlines to embed. For some reason, default seems to be only to embed uppercase and lowercase letters as well as numbers, but NOT punctuation... So now I selected to embed all font outlines and...IT WORKS! :)

Anyways, Korkus, thanks a lot for the help. (BTW, even with that option selected, the %26 doesn't work, neither does the &amp;. \046 works, though, as described in the Flash Help.)

12:48 pm on Jan 14, 2003 (gmt 0)

WebmasterWorld Senior Member korkus2000 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Good to know Sinner_G. I guess I need to bone up on my .as file usage. I usually pull strings from a database. Definitely a tip I will remember thanks. :)
 

Featured Threads

Hot Threads This Week

Hot Threads This Month