Post Archive

› July 12, 2002

Navigation Idea

  • Reported by Nate

Might be a good idea to make a flash navigation system which pulls it's information from link tag information, would promote accessibility through consistent use of link tags, and if such a system could be made, it would be quite extensible for dynamic sites. I'm not sure how/if flash can be directed to read specific text from the page in which it is embedded.

Comments

1. July 12, 2002 02:47 PM

Quote this comment

Andyed Posted…

Surely, this could be done. Flash calls a js function getLinkInfo.
links = document.getElementsByTag(“link”); // some funky parsing code // followed by some FSCommand mumbo jumbo blah.FSCommand(“Contents”, “contents.html”, “Next”, “page2.html”);
I’ll write the js if someone writes the Flash.

2. July 12, 2002 04:00 PM

Quote this comment

Bob Posted…

I know little to nothing about scripting in Flash, but didn’t I read that MX supports XML now? If you set up your common menu so that they were based in an XML file, and pulled that into Flash, I don’t see why that couldn’t work. But then again, as I said, I know little to nothing about how scripting in Flash.

The benefit of having the menu in XML is that not only could Flash (conceivably) parse it, but then you could use PHP or what-have-you to parse it for display across the (X)HTML pages in your site.

Just a thought.

3. July 12, 2002 04:01 PM

Quote this comment

Bob Posted…

Whoops... sorry about the double-post, Nate.

4. July 12, 2002 04:07 PM

Quote this comment

Nate Posted…

Hey no problem Bob, I wiped out the duplication. Very good idea btw.

5. July 12, 2002 04:12 PM

Quote this comment

Nate Posted…

I should point out that this idea stems from the osx version of Opera, which includes a link bar. This link bar scans each page for link elements and activates generic buttons if found (home, next, previous, up, index, etc). I’m somewhat ashamed to admit that as an author I hadn’t even heard of using links elements for this (read the spec nathan!).

6. July 12, 2002 04:37 PM

Quote this comment

Joshua Kaufman Posted…

Good intentions Nate, but as Bob noted, XML is built for this kind of stuff. The link tag can point to many different types of documents, but it can’t show any sort of meaning relationship between those documents. For example, you can use the link tag to point to a table of contents, but you can’t use it to tell the browser where the current document falls within the table of contents. On the other hand, XML elements are all related as parents and children. Every element knows exactly where it lies in the document, thus it’s great for automatically generating navigation. In fact, over the past few months, Peter Van Dijck has been working on this exact XML format, call XFML. What’s really cool about XFML is that it can even automatically generate links to related topics on other websites. This is very big stuff.

7. July 12, 2002 05:01 PM

Quote this comment

John Dowdell Posted…

Hi, if it’s a LINK in the HEAD then not all browsers will expose this to plugins. But if you’re crafting the HTML yourself you can pass this data in, without browser dependencies, through use of flashvars parameter in the OBJECT/EMBED tag. Is this close to what you’re seeking...? (Not all browsers support “javascript:” pseudo-URLs from plugins. You make an external XML file too, but that’s an additional net connection. Regards, John Dowdell Macromedia Support

8. July 12, 2002 05:33 PM

Quote this comment

Nate Posted…

Thank you Joshua and John for your insights. XFML looks quite intriguing, perhaps it could be referenced, as Bob was heading towards, to both render <link> tags and render flashvars? Seems like tying in XFML to [content management system of choice] could really open up some options.

9. July 12, 2002 07:45 PM

Quote this comment

paul Posted…

Unless the link bar is native to the browser (like in Mozilla (and you say Opera)), I don’t know of a javascript way to access links set using the Link HTTP header, so you would be limited to HTML links.

10. July 12, 2002 08:02 PM

Quote this comment

Nate Posted…

Paul, what about the getElementsByTagName that Andy mentions above.

11. July 13, 2002 12:23 PM

Quote this comment

paul Posted…

Sorry, what I meant is HTTP/1.1 defines a Link header with similar structure to that of the HTML link element so that you can set links using HTTP headers and add/remove them without modifying the document. I don’t think there is a way to access HTTP headers in javascript and so if you were to set links this way you wouldn’t be able to read them from the HTML document.

12. July 14, 2002 07:09 AM

Quote this comment

PeterV Posted…

Hi John, tying in XFML with content management systems is exactly what we’re working on this month. We’re building a metadata management system that will work independent of the CMS, so you can use it with whatever system you’re using currently.