View Full Version : linking to a swf file
web_mel
05-01-2008, 08:16 PM
I am trying to link text from Dreamweaver to display a swf file. Can anyone help?
Medyman
05-01-2008, 08:41 PM
You can't link to a swf file like you would to another page. You actually have to embed the swf into another page and then link to the that page.
For embedding Flash, I recommend SWFObject 2.0 (http://code.google.com/p/swfobject/)
jscheuer1
05-02-2008, 07:36 AM
Medyman is basically right in principle. The technically valid method to use is an object tag or an object tag pair, though many still prefer the deprecated object/embed tag pair, or just the deprecated embed tag. And there are various scripts around to do the 'heavy lifting' of these various methods for you. In fact, using certain types of javascript scripts (preferably, in most cases, with a non-javascript fall back) is the only way to avoid 'Click to Activate' in IE and Opera for Flash on a web page. However, if the swf doesn't require flashVars you can link directly to it and most browsers with the later versions of the Flash plug in will play it:
<a href="some.swf">Some Flash!</a>
But you will have no design control over how the swf is displayed, and your users will need to use either the back button, the address bar, or other methods of their browser to navigate away from the swf unless it has navigational functions built into it. You can even target it to an iframe on your page and many swf files will work out fine used in that manner, but it is not recommended.
web_mel
05-07-2008, 06:05 PM
Thanks for the help!
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.