Autor Zpráva
KKND2Krossfire
Profil
Mám tu problém. Chtěl jsem si na ročníkovou práci zjednodušit práci tím, že si to udělám na webovky a náhodou jsem na webu narazil na program pro vytváření flash menu. tak jsem se do toho po hlavě vrhnul, ale v zápětí jsem zjistil, že jsem si práci spíše zkomplikoval, protože fash menu mi sice jde vložit, ale nenastavím tam, že chci vložit menu s jiným pozadím a navíc s určitým rozlišením mi to vůbec nezobrazí čitelně. Zde je k´d celé stránky:
<html>
<head>
<bgsound src="Reel Big Fish, Reel Big Fish.mp3" loop="-1">
</head>
<body>
<body bgcolor="yellow">
<embed src="Menu.swf" quality="high" bgcolor="#99CCCC" width="900" height="200"
type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download
/index.cgi?P1_Prod_Version=ShockwaveFlash">
</body>
</html>

kódováno do menu.htm v poznámkovém bloku. Částečně jsem vycházel z Jak psát web, kde jsem si našel vložení flash ( obávám se, že se to týkalo pouze videa) a strejda Google mi našel tuhle diskuzi a nic moc jinýho.
THX za jakékoliv rady.
P.S.: Nejsem písatel webu profi. A nepřehrává mi to danou mp3 ačkoliv je v adresáři se stránkou
Joker
Profil
KKND2Krossfire
Viz třeba http://latrine.dgx.cz/jak-spravne-vlozit-flash-do-stranky
Nicméně flash menu mi nepřipadá jako úplně dobrý nápad.

<bgsound src="Reel Big Fish, Reel Big Fish.mp3" loop="-1">
brrrrrrr... (a menší "brrr" za pojmenovávání souborů)
KKND2Krossfire
Profil
Sorry, ale mp3 se tak jmenuje.
Vyzkoušeno.
Problém přetrvává s tím rozdílem, že pozadí už není modrý, ale bíly.
Používám Mozilla Firefox 3.0.7
Joker
Profil
KKND2Krossfire
Sorry, ale mp3 se tak jmenuje. A díky. vyzkouším.
Já vím, no... Možná že jsem s tím pojmenováváním souborů jen písmeny bez diakritiky, čísly a podtržítkem trochu staromódní, nicméně i dneska se pořád čas od času přesvědčím, že to není od věci.

Nicméně ještě k tomu mému názoru na flash menu: Problém vidím v tom, že menu je docela důležitá část stránky, takže by o něj neměli přijít ani návštěvníci bez flashe... no a málokomu se chce dělat Flash i alternativní obsah.
Bubák
Profil
Firefox nezná tag BGSOUND. Jestli IE umí *.mp3, má Yuhů pochybnosti.
KKND2Krossfire
Profil
Takže: Problém vyřešen úplně jinak. Chtělo to jen pořádně zprovoznit program, ve kterém se dělá flash menu. Program se jmenuje Flash Menu Labs Pro 2.0 a jde o to, že si místo export dám publish. tam mi vyjede obsáhlý kód a ten vám sem dám:
 <head>
  <title>Domácí stránka</title>
	<script type="text/javascript" src="swfobject.js"></script>
	<script type="text/javascript" src="flying.js"></script>
 </head>
 <body>
  <!-- Flash Menu Labs – www.flashmenulabs.com -->
	<div id="FlashMenuLabs" style="position:absolute; top:0px; padding-left0:px; z-index:0;">
		You need to upgrade your Flash Player or to allow javascript to enable Website menu. </br>
		<a href="http://www.adobe.com/go/getflashplayer">Get Flash Player</a>			
	</div>
	<script type="text/javascript">
	// <![CDATA[
		var so = new SWFObject("menu.swf", "menu", "700", "120", "8", "#000000");
		so.addParam("wmode", "transparent");
		so.addParam("scale", "noscale");
		so.addParam("salign", "TL");
		so.write("FlashMenuLabs");
	// ]]>
	</script>
 </head>

S tím, že soubory swfobject.js a flying.js si program vygeneruje sám. Jinak jejich kód je:
Flyingův kód
 
self.onError=null;
 currentX = currentY = 0;
 whichIt = null;
 lastScrollX = 0; lastScrollY = 0;
 NS = navigator.appName == "Netscape";
 IE = navigator.appName == "Microsoft Internet Explorer";
 if(NS) NSVer=parseFloat(navigator.appVersion);
 function scrollmenu() {
 if(IE) { diffY = document.body.scrollTop; diffX = document.body.scrollLeft; }
 if(NS) { diffY = self.pageYOffset; diffX = self.pageXOffset; }
 if(diffY!=lastScrollY) {
 percent=.1*(diffY-lastScrollY);
 if(percent>0) percent=Math.ceil(percent);
 else percent=Math.floor(percent);
 if(IE) document.all.FlashMenuLabs.style.pixelTop+=percent;
 if(NS){
 if (NSVer>4){
 menu=document.getElementById("FlashMenuLabs");
 menu.style.top=parseInt(menu.style.top)+percent+"px";
 }else
 document.FlashMenuLabs.top += percent;
 }
 lastScrollY = lastScrollY + percent;
 }
 if(diffX!=lastScrollX) {
 percent=.1*(diffX-lastScrollX);
 if(percent>0) percent=Math.ceil(percent);
 else percent=Math.floor(percent);
 if(IE) document.all.FlashMenuLabs.style.pixelTop+=percent;
 if(NS){
 if (NSVer>4){
 menu=document.getElementById("FlashMenuLabs");
 menu.style.top=parseInt(menu.style.top)+percent+"px";
 }else
 document.FlashMenuLabs.top += percent;
 }
 lastScrollX = lastScrollX + percent;
 }
 }if(NS || IE) action = window.setInterval("scrollmenu()",1);

Swobjectův:

/**
* SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
*
* SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
* http://www.opensource.org/licenses/mit-license.php
*
*/
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.pro

Vaše odpověď


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm:

0