/    Sign up×
Community /Pin to ProfileBookmark

HELP!: Replacing Flash Banner w/ Image on Detect (SWFObject?)

Hello WD Forums. After alot of time looking for a large community to help me out with my issue, I think I just hit the jackpot (450 people in this JS forum alone!).

I’ve been trying to get this issue resolved for a while now, I’m fairly new at JavaScript and this should be a fairly easy question. I would appreciate it if someone could help me out by giving me the proper code for my problem (too often people have been giving me sites with long, directionless walkthroughs that get me no where). I have a flash banner on my site, due to accessibility reasons, I was instructed that I have to somehow allow users to view a static image in place of the Flash banner in case they can’t/don’t want to install Flash Player.

As most of you know about the annoying grey-border/activeX thing with flash, I’ve used a .js file to remove it. I was told a file such as SWFObject could help me replace the flash banner with a static image if the browser detects that the user does not have flash installed. My .js file is called default_e and contains the following code:

[code=php]function displaySWF_1() { document.write(‘<object classid=”clsid:D27CDB6E-AE6D-11CF-96B8-444553540000″ id=”obj1″ codebase=”http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0″ border=”0″ width=”767″ height=”172″ align=”left”> <param name=”movie” value=”nohfcbanner.swf”> <param name=”quality” value=”High”> <embed src=”nohfcbanner.swf” pluginspage=”http://www.macromedia.com/go/getflashplayer” type=”application/x-shockwave-flash” name=”obj1″ width=”767″ height=”172″></object>’); }[/code]

What is script do I need to run in order to replace the flash banner with a static image? Do I need to create a new .js file such as SWFObject, or can I just include it to the current file above? The inclusion of the above .js file is called on my homepage default_e.asp and reads as follows (for reference):

[code=php]<script language=”JavaScript”> displaySWF_1();</script>
<noscript>
<object classid=”clsid:D27CDB6E-AE6D-11CF-96B8-444553540000″ id=”obj1″ border=”0″ width=”771″ height=”172″ align=”center”>
<param name=”noplayerimage” value=”nohfc/images/banner-sub.jpg”>
<param name=”movie” value=”nohfcbanner.swf”>
<param name=”quality” value=”High”>
<embed src=”nohfcbanner.swf”type=”application/x-shockwave-flash” name=”obj1″ width=”771″ height=”172″ align=”center”></object>
</noscript>[/code]

I greatly thank any and all of you who can help me with this issue, it’s the last outstanding issue before I launch this website. I look forward to your knowledge.

Cheers!

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@sticks464Dec 17.2006 — You can read all about SWFObject [URL=http://blog.deconcept.com/swfobject/]here[/URL]

Read, try it and see if it does what you want.
Copy linkTweet thisAlerts:
@droppenkikenJun 01.2009 — Did you ever find a solution to this?

Really annoying.. there use to be a feature in an old Dreamweaver version that let you choose a replacement image if flash no detected. Seems such a common thing to need but I've had real trouble trying to find a simple solution. I really ant to try and avoid creating 2 sites!
×

Success!

Help @graydon8 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.4,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...