Use encoding to ensure that variables are passed correctly.The example below illustrates how special characters can be retained using URL encoding:
A text file containing the following variable value:
Cost=+85
Will read into Flash as ‘Cost= 85′, dropping the + character.
However, using URL encoding to replace the + character the original text:
Cost=%2b85
Will result in Flash displaying ‘Cost= +85′ correctly.
Use this URL Encoding table for special characters:
| backspace |
%08 |
| tab |
%09 |
| linefeed |
%0A |
| return |
%0D |
| space |
%20 |
| ! |
%21 |
| ” |
%22 |
| # |
%23 |
| $ |
%24 |
| % |
%25 |
| & |
%26 |
| ‘ |
%27 |
| * |
%2A |
| + |
%2B |
| , |
%2C |
| - |
%2D |
| . |
%2E |
| / |
%2F |
| < |
%3C |
| = |
%3D |
| > |
%3E |
| ? |
%3F |
| @ |
%40 |
| [ |
%5B |
| \ |
%5C |
| ] |
%5D |
| ^ |
%5E |
| _ |
%5F |
| ` |
%60 |
| { |
%7B |
|
|
|
| | |
%7C |
| } |
%7D |
| ~ |
%7E |
| ¢ |
%A2 |
| £ |
%A3 |
| ¥ |
%A5 |
| | |
%A6 |
| § |
%A7 |
| « |
%AB |
| ¬ |
%AC |
| ¯ |
%AD |
| º |
%B0 |
| ± |
%B1 |
| ª |
%B2 |
| , |
%B4 |
| µ |
%B5 |
| » |
%BB |
| ¼ |
%BC |
| ½ |
%BD |
| ¿ |
%BF |
| À |
%C0 |
| Á |
%C1 |
| Â |
%C2 |
| Ã |
%C3 |
| Ä |
%C4 |
| Å |
%C5 |
| Æ |
%C6 |
| Ç |
%C7 |
| È |
%C8 |
| É |
%C9 |
|
|
|
| Ê |
%CA |
| Ë |
%CB |
| Ì |
%CC |
| Í |
%CD |
| Î |
%CE |
| Ï |
%CF |
| Ð |
%D0 |
| Ñ |
%D1 |
| Ò |
%D2 |
| Ó |
%D3 |
| Ô |
%D4 |
| Õ |
%D5 |
| Ö |
%D6 |
| Ø |
%D8 |
| Ù |
%D9 |
| Ú |
%DA |
| Û |
%DB |
| Ü |
%DC |
| Ý |
%DD |
| Þ |
%DE |
| ß |
%DF |
| à |
%E0 |
| á |
%E1 |
| â |
%E2 |
| ã |
%E3 |
| ä |
%E4 |
| å |
%E5 |
| æ |
%E6 |
| ç |
%E7 |
| è |
%E8 |
|
|
|
| é |
%E9 |
| ê |
%EA |
| ë |
%EB |
| ì |
%EC |
| í |
%ED |
| î |
%EE |
| ï |
%EF |
| ð |
%F0 |
| ñ |
%F1 |
| ò |
%F2 |
| ó |
%F3 |
| ô |
%F4 |
| õ |
%F5 |
| ö |
%F6 |
| ÷ |
%F7 |
| ø |
%F8 |
| ù |
%F9 |
| ú |
%FA |
| û |
%FB |
| ü |
%FC |
| ý |
%FD |
| þ |
%FE |
| ÿ |
%FF |
|
|
|
Additional information
The TAB character (URL encoded with %09) is not supported in Flash or HTML. In Flash and HTML, the TAB key is reserved for switching focus between form fields.
Papervision3D is an open source 3D engine for Flash. Its fairly new but it has allowed flash developers to produce some amazing work. More information on Papervision3D can be found @ http://blog.papervision3d.org/.
Below are some of my favorite sites that make use of Papervision3D.
//construct the listener object
myListenerObject = new Object();
myListenerObject.onChanged = function(txt) {
//perform this when textfield value has changed
execute();
}
//call the TextField.addListener method to register the object
Textfield.addListener(myListenerObject);
I always find my self trying to dig up old projects to rip out code for new project. So i decided to start saving re-usable code for me and others to use in form of a blog. This blog...
Hopefully you find it usefull as I have...
Peace!!!