ksecor
asked on
Need to pass a special character into flash with xml
I'm dynamically creating buttons with actionscript 3 from xml. One of my strings has the notorious middle dot. I've tried unicode #x00B7, &midddot; and a few other things, but flash always takes those characters literally. How do I pass the middle dot in so flash displays it as a middle dot?
ASKER
Don't think I can do that in an attribute...
<client name="<![CDATA[20 · 21 Restaurant & Bar]]">
<client name="<![CDATA[20 · 21 Restaurant & Bar]]">
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Try using unicode as follows:
<client name="20 \u0095 21 Restaurant \u0026 Bar">
Also make sure your font charset is embeded in the application.
<client name="20 \u0095 21 Restaurant \u0026 Bar">
Also make sure your font charset is embeded in the application.
ASKER
No...that doesn't work....you can see the gall at http://mm214.com/6dg/6dgGall.swf and the xml at http://mm214.com/6dg/port.xml
what about using url encoded characters?
<client name="20 %B7 21 Restaurant & Bar">
Then you can use unescape() function to convert that string before using in the labels
<client name="20 %B7 21 Restaurant & Bar">
Then you can use unescape() function to convert that string before using in the labels
I agree with VULTUROUS. If you want to make this XML scalable, turn the attribute into a node. You'll spend some time on it now, but in the long run, you'll save yourself a lot of headache and even more time.
ASKER
The unescape does't work, I'm convinced it has to be a node value...thank you all
<code>
-V
Open in new window