PDA

View Full Version : Named Anchors?



bingostew
23 May 2007, 07:55 AM
I suffer from i'mnotadeveloperi'mjustadesigneritis so please bear with me...

I've used named anchors in sites for years and for some reason, I can't get them to work in this situation. I've googled for the past 2 hours and I can't seem to find a solution.

I've got a page with a main swf file at the top and a bunch of separate swfs lined up down the page. I've placed links to named anchors in 3 places in the main swf and I have the 3 corresponding swf objects "named".

the btsotr.swf object is named "harrisonburg"
the frederick.swf object is named "staunton"
the irisinn.swf object is named "waynesboro"

(I also tried using <a name="harrisonburg> etc... tags around the object with no success)

The links in the swf are simply:

getURL("#harrisonburg"); etc...

Here's (http://www.csvbb.net/test.htm) my test page.

Any help would be greatly appreciated.

Thanks!

Wickham
23 May 2007, 10:08 AM
Try id instead of name as name is deprecated now and your browser may be objecting to it, although name usually still works. I admit I've never tried from an anchor inside a flash file as I can't design flash.

Extract from a tutorial:-
Place this code at the position in the html file that you want to move a viewer from:-
<a href="#top">back to top</a>

Place this code at the place in the html file that you want to show at the top of the screen:-
<a id="top"></a>

If you want an anchor from one page to a place on another page, the code is:-

<a href="tables.html#tableswide">tables</a> at the place you want to move from and

<a id="tableswide"></a> at the place you want the viewer to go to on the tables.html page. You cannot place an anchor in a frame in this way, you will just be linked to the top of the main frameset page.