PDA

View Full Version : showing image as an alternative to flash


meerah
02-25-2006, 02:02 PM
Hi all,
I hope I do not annoy anybody when I ask about how to deal a problem that I had already disscussed here before but was not solved.
So the page I am doin is right here ..it is just in the proccess of being made so dont be scared to death .. http://xperimental.wz.cz
What I need to do is to place a streaming video on top and display that image that is right now present there just as an alternative for those that have not flash player enabled ... I tried several things like those mentioned on
http://blog.deconcept.com/2005/03/31/proper-flash-embedding-flashobject-best-practices
but nothing worked for me...that might be just only for reason that I am experienced more in graphics programs than in html and javascript ..
Can anyone please here explain me just where to write what to show flash in the topbar or image when it is not possibble ???
I wont mind using javascript or whatever method .. There is not paid so much attention whether it would be properly displayed in netscape or not....so it can be really simple..


Cheers

domedia
02-25-2006, 03:11 PM
When you publish through Flash it automatically creates the html to show alternative content when flash (or the right flash player is not detected)

meerah
02-25-2006, 04:05 PM
Srr..i dont understand that..
When I publish that in Flash I have a html file and swf file ...But how to place it in that html code,... together with an alternative image ? I dont know whether it is possibble to make two versions in the flash publishing process itself ...

domedia
02-25-2006, 05:00 PM
CWhen you publish in Flash, check the checkbox that says 'check for version' and Flash creates the needed code in your html file.

meerah
02-25-2006, 09:32 PM
Thanks for your help .. I am working with flash for 2 years and had been doin just interactive flash content but did not realize ever it can be accomplished directly with flash.. Well, but, I have tried to compile from my code with tables
(I want streaming flash to be a content of one cell of the table...I hope it is possible) with that code that I got after publishing in Flash and the result is that it does not show flash neither alternative images.. I am still not sure where to place correctly the part I had done in dreamweaver (structure of tables) with that content published in Flash.. The problem also is that I need those rollover buttons made in dreamweaver to be together with the header the alternative content and occupy together one cell, while my flash content ( when Flash plugin is present) has its own set of rollover buttons ....
Thanks so far for your help...I really apprecciate it



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script language="JavaScript" type="text/javascript">
<!--
// -----------------------------------------------------------------------------
// Globals
// Major version of Flash required
var requiredMajorVersion = 7;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Revision of Flash required
var requiredRevision = 0;
// the version of javascript supported
var jsVersion = 1.0;
// -----------------------------------------------------------------------------
// -->
</script>
<script language="VBScript" type="text/vbscript">
<!-- // Visual basic helper required to detect Flash Player ActiveX control version information
Function VBGetSwfVer(i)
on error resume next
Dim swControl, swVersion
swVersion = 0

set swControl = CreateObject("ShockwaveFlash.ShockwaveFlash." + CStr(i))
if (IsObject(swControl)) then
swVersion = swControl.GetVariable("$version")
end if
VBGetSwfVer = swVersion
End Function
// -->
</script>
<script language="JavaScript1.1" type="text/javascript">
<!-- // Detect Client Browser type
var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
jsVersion = 1.1;
// JavaScript helper required to detect Flash Player PlugIn version information
function JSGetSwfVer(i){
// NS/Opera version >= 3 check for Flash plugin in plugin array
if (navigator.plugins != null && navigator.plugins.length > 0) {
if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
descArray = flashDescription.split(" ");
tempArrayMajor = descArray[2].split(".");
versionMajor = tempArrayMajor[0];
versionMinor = tempArrayMajor[1];
if ( descArray[3] != "" ) {
tempArrayMinor = descArray[3].split("r");
} else {
tempArrayMinor = descArray[4].split("r");
}
versionRevision = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;
flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
} else {
flashVer = -1;
}
}
// MSN/WebTV 2.6 supports Flash 4
else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
// WebTV 2.5 supports Flash 3
else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
// older WebTV supports Flash 2
else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
// Can't detect in all other cases
else {

flashVer = -1;
}
return flashVer;
}
// If called with no parameters this function returns a floating point value
// which should be the version of the Flash Player or 0.0
// ex: Flash Player 7r14 returns 7.14
// If called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
reqVer = parseFloat(reqMajorVer + "." + reqRevision);
// loop backwards through the versions until we find the newest version
for (i=25;i>0;i--) {
if (isIE && isWin && !isOpera) {
versionStr = VBGetSwfVer(i);
} else {
versionStr = JSGetSwfVer(i);
}
if (versionStr == -1 ) {
return false;
} else if (versionStr != 0) {
if(isIE && isWin && !isOpera) {
tempArray = versionStr.split(" ");
tempString = tempArray[1];
versionArray = tempString .split(",");
} else {
versionArray = versionStr.split(".");
}
versionMajor = versionArray[0];
versionMinor = versionArray[1];
versionRevision = versionArray[2];

versionString = versionMajor + "." + versionRevision; // 7.0r24 == 7.24
versionNum = parseFloat(versionString);
// is the major.revision >= requested major.revision AND the minor version >= requested minor
if ( (versionMajor > reqMajorVer) && (versionNum >= reqVer) ) {
return true;
} else {
return ((versionNum >= reqVer && versionMinor >= reqMinorVer) ? true : false );
}
}
}
return (reqVer ? false : 0.0);
}
// -->
</script>

<style type="text/css">
<!--


body {
background-image: url(__background.png);
background-repeat: repeat-x;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style>
<script type="text/JavaScript">




function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x ; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}



function aktuality(){
window.frames['iframe1'].location.href="";
window.frames['iframe2'].location.href="";
}
function firmicka(){
window.frames['iframe1'].location.href="__vychoziKontaktSmall.html";
window.frames['iframe2'].location.href="__vychoziKontakt.html";
}
function vyrobky(){
window.frames['iframe1'].location.href="__vychoziVyrobkySmall.html";
window.frames['iframe2'].location.href="__vychoziVyrobky.html";
}
function prislusenstvi(){
window.frames['iframe1'].location.href="__vychoziPrislusenstviSmall.html";
window.frames['iframe2'].location.href="__vychoziPrislusenstvi.html";
}
function stazeni(){
window.frames['iframe1'].location.href="__vychoziStazeniSmall.html";
window.frames['iframe2'].location.href="__vychoziStazeni.html";
}
//-->
</script>
</head>
<script language="JavaScript" type="text/javascript">
<!--
var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
if(hasRightVersion) { // if we've detected an acceptable version
var oeTags = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
+ 'width="780" height="116"'
+ 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
+ '<param name="movie" value="streamBubbles.swf" /><param name="menu" value="false" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />'
+ '<embed src="streamBubbles.swf" menu="false" quality="high" bgcolor="#ffffff" '
+ 'width="780" height="116" name="streamBubbles" align="middle"'
+ 'play="true"'
+ 'loop="false"'
+ 'quality="high"'
+ 'allowScriptAccess="sameDomain"'
+ 'type="application/x-shockwave-flash"'
+ 'pluginspage="http://www.macromedia.com/go/getflashplayer">'
+ '<\/embed>'
+ '<\/object>';
document.write(oeTags); // embed the flash movie
} else { // flash is too old or we can't detect the plugin
var alternateContent = '<body onload="MM_preloadImages('_menu_prislusOver.png','_menu_vy robkyOver.png','_menu_firmaOver.png','_menu_aktual ityOver.png','__aktualityOver.png','__firmaOver.pn g','__vyrobkyOver.png','__prislusenstviOver.png',' __kestazeniOver.png')">
<table width="795" height="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<th width="20" rowspan="4" align="right" scope="col"></th>
<th colspan="2" scope="col">_____fatalFinalTopBar copy.png__rolRestMenu copy.png__aktualityNormal.png (#)__firmaNormal.png (#)__vyrobkyNormal.png (#)__prislusenstviNormal.png (#)__kestazeniNormal.png (#)</th>
<th width="3" rowspan="4" scope="col"> [/url] (#) (#)</th>
</tr>

<tr>
<td width="183" height="70" bordercolor="0" background="__outlinesSmallest.png"></td>
<td width="605" bordercolor="0" background="__outlinesSmall.png"><iframe name="iframe1" width="605" marginwidth="0" height="70" marginheight="0" scrolling="no" frameborder="0" id="content" ></iframe></td>
</tr>

<tr>
<td height="388" colspan="2" bordercolor="0" background="__outlinesBig.png"><iframe id="iframe2" name="iframe2" width="788" height="388" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe></td>
</tr><tr><td height="2" colspan="2">__background.png</td></tr>
</table>'
+ 'This content requires the Macromedia Flash Player.'
+ '<a href=http://www.macromedia.com/go/getflash/>Get Flash</a>';
document.write(alternateContent); // insert non-flash content
}
// -->
</script>
<noscript>
<body onload="MM_preloadImages('_menu_prislusOver.png','_menu_vy robkyOver.png','_menu_firmaOver.png','_menu_aktual ityOver.png','__aktualityOver.png','__firmaOver.pn g','__vyrobkyOver.png','__prislusenstviOver.png',' __kestazeniOver.png')">
<table width="795" height="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<th width="20" rowspan="4" align="right" scope="col"></th>
<th colspan="2" scope="col">_____fatalFinalTopBar copy.png__rolRestMenu copy.png__aktualityNormal.png (#)__firmaNormal.png (#)__vyrobkyNormal.png (#)__prislusenstviNormal.png (#)__kestazeniNormal.png (#)</th>
<th width="3" rowspan="4" scope="col"> (#) (#)[url="#"]</th>
</tr>

<tr>
<td width="183" height="70" bordercolor="0" background="__outlinesSmallest.png"></td>
<td width="605" bordercolor="0" background="__outlinesSmall.png"><iframe name="iframe1" width="605" marginwidth="0" height="70" marginheight="0" scrolling="no" frameborder="0" id="content" ></iframe></td>
</tr>

<tr>
<td height="388" colspan="2" bordercolor="0" background="__outlinesBig.png"><iframe id="iframe2" name="iframe2" width="788" height="388" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe></td>
</tr><tr><td height="2" colspan="2">__background.png</td></tr>
</table>

</noscript>




</body>
</html>

domedia
02-26-2006, 07:17 PM
part of the code goes in the head area,
the other part goes where you want the flash to output in your html.

Cureently you've pasted all the code inside the HEAD area.