all groups > flash actionscript > april 2006 >
You're in the

flash actionscript

group:

Need help with Link passed from XML


Need help with Link passed from XML hih
4/17/2006 5:46:52 PM
flash actionscript:
This is to create a flash driven navigation menu. What I have is a coldfusion
page that serves a simple XML formatted page. There are 3 XML components,
linkLabel, linkURL and linkType. The label just passes text, the type is just a
number 0-9 that is used to determine the style of the button. The linkURL that
is passed from coldfusion comes across encoded for XML, so what I end up with
is url's that replace "&" with ";amp;".

So my question is this, is there an easy way in the actionscript to replace
the ";amp;" with "&"? Other than that little problem, the rest of the script
runs just fine, I just can't seem to find the syntax I'm looking for to replace
items in a string. I saw the code for replacesel() but this doesn't seem to do
it, unless i'm writing it wrong.
Re: Need help with Link passed from XML hih
4/17/2006 6:08:22 PM
nevermind, i went a different route. I also needed to track the number of click
throughs to each link, so rather than send the entire link to flash, I just
send the data table ID for that link and build a url in flash...
Re: Need help with Link passed from XML blemmo
4/17/2006 11:03:32 PM
Just in case you want something similar in future:
string = string.split("&").join("&");
is an easy way to replace something in a string (here '&' gets replaced with '&').

greets,
AddThis Social Bookmark Button