Forum Moderators: not2easy
Is there a way to put the flash menu in a css and just reference that css where the menu should be on each page? This way, it's only ONE menu throughout the site?
Help!
Thanks
But CSS has no way to magically include a flash object.
(all you have are background images).
Still given a bit of html (e.g. a nested list of links), that could be included on many a page using SSI, CSS can style it into a nice looking menu even having dropdown or fly-out submenus. Just don't expect any real animation.
- Look at SWF Object, which solves (at least) four problems - the IE "gray line" around Flash objects, invalid <embed> element nested inside <object>, bloated and buggy stock Javascript to publish the Flash, and graceful degradation by placing the alternate content in the page first. This, however, does not directly solve your problem; but you should use it in combination with one of the following - or just use it by itself. Your code would look like this:
<div id="my_flash_object"><img src="flash_alt_content.jpg"></div>
And SWF object writes to the div "my_flash_object" on load. Very clean and simple.
- You can use the <object> element and write to it with Javascript. Less used and makes it Javascript dependent (which is fine, really, and what SWF object does anyway.)
- You can use SSI (server side includes) and parse your html pages as .shtml. Simple:
<!-- #include virtual="/path/to/page/containing/Flash/nav.txt" -->
- You can do the same thing with PHP, change your server config to parse html pages as PHP so you don't have to rename things:
<?php
include_once('/path/to/page/containing/Flash/nav.txt');
?>
- You can do the same with perl or ASP
Any of these ideas are 10x better than frames or iFrames because when indexed, those framed pages are out of context and generally never lead back to your site (this is but one reason.)
[edited by: rocknbil at 2:54 pm (utc) on May 20, 2009]
Where would I go to find instruction on how to incorporate the flash into the javascript? The suggestion is great but doesn't help me if I can't learn how to do it.
Any help you can give is appreciated. Thanks!
Start there; download, play with the tut's, it's very easy.