How can you get and set the hash or anchor part of an URL in pure Actionscript? When googling for a solution I've found explainations for doing it using JavaScript, but is it possible to get it without using JavaScript? (I'm using Actionscript 2, I may consider updating the code to AS 3, but it doesn't seem to be a quite straight forward process.)
+5
A:
What you want is SWFAdress, it's a small library that let's you modify that part of the url from flash (via a javascript)
grapefrukt
2008-11-18 07:54:19
It's probably useful, but it is based on JavaScript. I wanted to know if it is possible at all to do this without JavaScript, but I'm starting to beleave it's not.
Stein G. Strindhaug
2008-11-18 10:10:59
You will always need javascript.
moritzstefaner
2008-12-07 19:12:41
A:
If you ever make it to actionscript3 you could use the com.adobe.net.URI class. It exposes a URI::fragment getter/setter which looks to be exactly what you need.
Pete Hodgson
2009-02-05 17:56:51
SWFAddress is the tool for the job. Anything else is simply .. unnecessary. SWFAddress is available for AS2 or AS3 so you never have to write your own.
Jenko
2009-06-02 17:51:50