Flash Menu !! re-load HILFE

B0MBEN

Grünschnabel
Hi zusammen.

Ich hab ein Flash Menu gemacht und alles ****t super. am anfang habe ich einen preloader reingebaut und dann kommt das menü zum vorschein.
wenn ich die swf aber in meine page einbaue und auf verschiedene (nicht im flash eingebaute) menüpunkte klicke, sich die seite also neu läd, dann läd das flash auch immer wieder von neu...
kann ich dem vorbeugen?

thx
 

Anhänge

  • MainMenu.rar
    34,9 MB · Aufrufe: 31
Hi ... die Datei is ja riesig. Es schon zu spät mir das runterzuladen :)

Mir fällt da spontan AJAX oder Inhalte per JavaScript ein- und ausblenden ein. Wenn ich morgen dazu komme erklär ich nochma was ich meine. Aber vielleicht kannst du ja schon was mit den Gedankenfetzen anfangen.

Gute NAcht, bis dann.
 
moin.
danke schonmal für die mühe.
ne kann leider nix damit anfange :( :)
aber was ich mir denken kann ist, dass ich das im php bzw html festlegen muss und nicht im flash. richtig?
 
Mir ist zwar schleierhaft, wieso du eine 34 MB große Datei für solch ein einfaches Menü braucht, aber na gut. Am einfachsten wirds das wohl mit einem Framework zu machen sein. Aber du hast schon recht, damit solltest du eher im HTML- oder PHP-Bereich fragen.

Gruß
 
Ich hab hier mal ebend einen kleinen Quelltext zusammen geschrieben.

Also so meinte ich das mit JavaScript:

HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <title>Meine Seite</title>  
  <style type="text/css">
   body{
   margin:0;
   background-color: #999;
   font-size:12px;
   font-family:"verdana", sans-serif;
   }
   h1{
   font-size:18pt;
   font-weight:bold;
   font-family:'Verdana', sans-serif;
   color:#333;
   }
   p{
   font-size:10pt;
   font-family:'Verdana', sans-serif;
   font-weight:bold;
   margin:5px;
   margin-left:0;
   color:#333;
   }
   #header{
		width:800px;
		height:150px;
		background-color:darkblue;
		padding:10px;
		color:#fff;
		margin:1px;
   }
   #navi{
		width:800px;
		height:30px;
		background-color:blue;
		padding:10px;
		color:#fff;
		margin:1px;
   }
   #navi a{
		color:#fff;
   }
   #content{		
		width:800px;
		height:400px;
		background-color:#ccc;
		padding:10px;
		color:#000;
		margin:1px;
   }
   .content{		
		/* Inhalte standardmäßig ausblenden */
		display:none;
   }
  </style>
  <script>
  <!--
	function showPage(pageNr){
		content_array = getElementsByClassName('content');
	
		for(i=0;i<content_array.length;i++) {
			if(content_array[i].id == "page"+pageNr){
				content_array[i].style.display = 'block';
			}else{
				content_array[i].style.display = 'none';
			}
		}		
	}

	function getElementsByClassName(class_name)
	{
		var all_obj,ret_obj=new Array(),j=0,teststr;

		if(document.all)all_obj=document.all;
		else if(document.getElementsByTagName && !document.all)
		  all_obj=document.getElementsByTagName("*");

	  for(i=0;i<all_obj.length;i++)
		{
		  if(all_obj[i].className.indexOf(class_name)!=-1)
		  {
			teststr=","+all_obj[i].className.split(" ").join(",")+",";
			if(teststr.indexOf(","+class_name+",")!=-1)
			{
			  ret_obj[j]=all_obj[i];
			  j++;
			}
		  }
		}
		return ret_obj;
	}
	//-->
  </script>
</head>
<body>
	<div id="header">
		Header
	</div>
	<div id="navi">
		Hier dein Flash Men&uuml;<br>
		<a href="javascript:showPage(1);">Link 1</a>&nbsp;&nbsp;|&nbsp;&nbsp;
		<a href="javascript:showPage(2);">Link 2</a>&nbsp;&nbsp;|&nbsp;&nbsp;
		<a href="javascript:showPage(3);">Link 3</a>&nbsp;&nbsp;|&nbsp;&nbsp;
		<a href="javascript:showPage(4);">Link 4</a>&nbsp;&nbsp;|&nbsp;&nbsp;
		<a href="javascript:showPage(5);">Link 5</a>&nbsp;&nbsp;|&nbsp;&nbsp;		
	</div>	
	<div id="content">
		<div class="content" id="page1" style="display:block;">
			<h1>Inhalt für Seite 1.</h1>
			Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. 
		</div>
		<div class="content" id="page2">
			<h1>Inhalt für Seite 2.</h1>
			Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. 
		</div>
		<div class="content" id="page3">
			<h1>Inhalt für Seite 3.</h1>
			Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. 
		</div>
		<div class="content" id="page4">
			<h1>Inhalt für Seite 4.</h1>
			Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. 
		</div>
		<div class="content" id="page5">
			<h1>Inhalt für Seite 5.</h1>
			Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. 
		</div>
	</div>
</body>
</html>

Keine Ahnung ob das ne gute Lösung ist, aber es ist eine.

Alternative kannst du natürlich auch mir den uralten Frame arbeiten aber das ist eher nicht zu empfehlen.

Gruß Max
 

Anhänge

  • index.rar
    1,2 KB · Aufrufe: 21

Neue Beiträge

Zurück