| | |
How to insert Flash banner in html ?
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Aug 2009
Posts: 12
Reputation:
Solved Threads: 1
Hi this is a script i found, this shows the flash, and if the user doesn't have flash it will show an image.
just change the originalflashfile.swf to the name of your flash file and directory. And also change the width and height to the same value as your flash file.
and do the same with thealternativeimage.jpg to an alternative image instead of the flash file for the small% of people who don't have flash installed. And also change the height and width to match your image file.
Hope that helps.
<SCRIPT LANGUAGE=JavaScript1.1>
<!--
var MM_contentVersion = 6;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
var words = navigator.plugins["Shockwave Flash"].description.split(" ");
for (var i = 0; i < words.length; ++i)
{
if (isNaN(parseInt(words[i])))
continue;
var MM_PluginVersion = words[i];
}
var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0
&& (navigator.appVersion.indexOf("Win") != -1)) {
document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
document.write('on error resume next \n');
document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
document.write('</SCR' + 'IPT\> \n');
}
if ( MM_FlashCanPlay ) {
document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ');
document.write(' ID="script" WIDTH="306" HEIGHT="296" ALIGN="">');
document.write(' <PARAM NAME=movie VALUE="originalflashfile.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> ');
document.write(' <EMBED src="originalflashfile.swf" quality=high bgcolor=#FFFFFF ');
document.write(' swLiveConnect=FALSE WIDTH="306" HEIGHT="296" NAME="script" ALIGN=""');
document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">');
document.write(' </EMBED>');
document.write(' </OBJECT>');
} else{
document.write('<IMG SRC="alternativeimage.jpg" WIDTH="306" HEIGHT="296" usemap="#script" BORDER=0>');
}
//-->
</SCRIPT><NOSCRIPT><IMG SRC="alternativeimage.jpg" WIDTH="306" HEIGHT="296" usemap="#script" BORDER=0></NOSCRIPT>just change the originalflashfile.swf to the name of your flash file and directory. And also change the width and height to the same value as your flash file.
and do the same with thealternativeimage.jpg to an alternative image instead of the flash file for the small% of people who don't have flash installed. And also change the height and width to match your image file.
Hope that helps.
Last edited by Enthused; Sep 8th, 2009 at 7:36 pm. Reason: miss placed "f" nothing to worry about
•
•
Join Date: Jan 2008
Posts: 79
Reputation:
Solved Threads: 9
first u must create your banner in flash, then export your movie in swf format. Now u ready to insert ur banner in any html pages.
•
•
Join Date: Jul 2009
Posts: 106
Reputation:
Solved Threads: 1
create flash, then export flash file in swf format. Insert swf file in HTML page.
first create a flash banner in adobe flash cs3 and save a file into swf format and insert your swf file in html file using below code
HTML and CSS Syntax (Toggle Plain Text)
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" name="saapsubanim" WIDTH="778" HEIGHT="229" hspace="0" vspace="0" ALIGN="" id="saapsubanim"> <!-- enter flash file name, width, height --> <PARAM NAME=movie VALUE="saapsubanim.swf"> <!-- enter flash file name here --> <PARAM NAME=menu VALUE=false> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#DDDDDD> <param name="SCALE" value="exactfit"> <param name="wmode" value="transparent"> <EMBED src="saapsubanim.swf" WIDTH="778" HEIGHT="229" hspace="0" vspace="0" ALIGN="" menu=false quality=high bgcolor=#DDDDDD NAME="saapsubanim" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" scale="exactfit" wmode="transparent"></EMBED> </OBJECT>
Thanx,
Shiriyal
http://shiriyal.blogspot.com/
if you problem solved add me as a reputation and mark it mark as solved
Shiriyal
http://shiriyal.blogspot.com/
if you problem solved add me as a reputation and mark it mark as solved
![]() |
Similar Threads
- How to link my flash banner to a webpage? (HTML and CSS)
- How to insert a Flash movie in html and maintain w3c standards? (HTML and CSS)
- Problems with Flash in the background, and HTML/CSS content in the foreground.. (HTML and CSS)
- how to insert flash media files in asp.net page (ASP.NET)
- Flash/Javascript/HTML code for gallery page (Web Development Job Offers)
- Inserting (large) flash banner in HTML page (HTML and CSS)
Other Threads in the HTML and CSS Forum
- Previous Thread: Initial task while designing website.
- Next Thread: CSS Pro WANTED
| Thread Tools | Search this Thread |
.net acrobat actionscript3 adobe adobeacrobat air ajax amazon amf animation api apple applet back broken button byte clone cloud code dell desktop directory disk dojofoundation elearning embed file firefox flash flash-develop flashlite fotb free gaming gdi ghost google hardware iamthwee image imflash industry intel interactivemap java javascript jpanel jpeg laptop lexicon macbook mediawiki memory microsoft moonlight multimedia mysql nand news open panel pcm pdf php picture picturebox play plugins projectmanagement quicktime ram random reputationmanagement sandisk screen search security seo silverlight software solidstatedrive sproutcore ssd storage streamingmedia subdomain swappingxmlfromflash swf unload upload video vulnerability web website windowsmedia xml xmlnotloading zephyr zeroday






