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

flash actionscript

group:

getURL and named anchors


getURL and named anchors SeaKayaker
11/2/2006 9:08:28 PM
flash actionscript:
Apparently, this is a known issue with many browsers.

I'm wondering if there's a simple (or not) workaround.

I've got a FLASH US map with each state a button to go to a separate part of
one HTML document.

This works fine when I test in Flash. But when I place the SWF in an HTML
document, the buttons just take me to the TOP of the directory document, not to
the named anchor for that state.

_root.map.state1.onPress=function(){
getURL("directory.html#WA");
}

Should go to the "WA" section but instead, it goes to the top of the list,
just directory.html.

Thanks in advance.
Jim
Re: getURL and named anchors mkeefe
11/2/2006 10:46:45 PM
A simple (yet annoying) workaround is to use getURL to call a
Javascript function that will append the target anchor just like a
normal link on a web page.


[quoted text, click to view]
Re: getURL and named anchors orangetractor
12/15/2006 10:02:34 PM
I'm having the same problem; can't link to a named anchor in an HTML page. The getURL command takes me only to the top of the HTML page.

I love a suggestion,
Re: getURL and named anchors orangetractor
12/15/2006 10:21:50 PM
Just found the answer.

The getURL command works, but not offline. Upload files to server and test; it works then.

getURL("pagename.html#anchorname");
}

AddThis Social Bookmark Button