Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flash movie positioning issue.

Status
Not open for further replies.

countdrak

Programmer
Jun 20, 2003
358
US
First my code

Code:
<table width="791" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <!--DWLayoutTable-->
	<tr>
   	  <td valign="top"><img src="images/Logo.gif" width="237"> </td>
      <td valign="top"><div id="Layer1" style="position:absolute; width:554px; height:200px; z-index:1; left: 497px; top: 10px;"> 
        <object codebase="[URL unfurl="true"]http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"[/URL] width="554" height="200" align="left">
              <param name="allowScriptAccess" value="sameDomain" />
              <param name="movie" value="[URL unfurl="true"]http://127.0.0.1/test.swf">[/URL]
              <param name="wmode" value="transperant">
              <param name="quality" value="high">
			  <PARAM NAME=bgcolor VALUE=#FFFFFF>
              <embed src="test.swf" wmode="transparent"  quality="high" width="554" height="200" name="menu" align="left" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="[URL unfurl="true"]http://www.macromedia.com/go/getflashplayer"></embed>[/URL]
        </object></div>
      </td>
  </tr>
</table>

Here is my problem. Simple code with a logo on the left and a flash drop down menu next to it. Its a header file for a website. The drop down menu naturally has to be transperant so that it drops over the images and other content on the pages. But the position of the flash file has to RELATIVE to the logo, so when i minimize or make the window smaller the menu should stay next to the logo, right now it stays where its at even if the window size changes. But when i change the position to RELATIVE in the same code , my flash menu is no longer transperant? Does anyone know whats going on? How do I make it relative to the logo next to it?
 
Intially I was positioning everything using tables, because we wanted support for older browsers. But the drop down menu is a flash swf.

Check out
Thats the type of menu we have, except right under the buttons I have images and some content. So if I dont use div tags and create a layer, there will be a huge white space (height of the flash swf-200px) and then the images and my content start. I don't want that, so I use layers in my header. I am sorry its kinda hard to explain. But I will find more examples if I can. Thanks.
 
Sounds like you need to put the table in the div - not just the flash movie:

Code:
<div>
<table>
</table>
</div>

[conehead]
 
Ok I tried that...and It sort of worked...except my flash component, does not remain transperant after that.

Initially before I had the flash menu,each page was made up of three parts, a TABLE with the header, another TABLE under it with a body and third table under it with the footer information.

Now because I have the flash menu, I need layer that overlaps the body table, to diplay the menu right on top of the page.

So now my homepage looks like this

Code:
<div>
  <table></table>
</div>
 <table></table>
 <table></table>

But then becasue my flash movie does not remain tranperant it convers the body table. I have know clue how to fix it, will I have to change the whole design? Appreicate all the help. thanks.
 
This is all written in coldfusion so here is all the code.

Header.cfm

Code:
<script language="JavaScript" type="text/JavaScript">
<!--
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];}}
}
//-->
</script>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>



<div id="Layer1" style="position:absolute; width:200px; height:115px; z-index:1; left: 497px; top: 18px;">
<table width="791" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <!--DWLayoutTable-->
	<tr>
   	  <td valign="top"><img src="images/Logo.gif" width="237"> </td>
      <td valign="top"> 
        <object codebase="[URL unfurl="true"]http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"[/URL] width="554" height="200" align="left">
              <param name="allowScriptAccess" value="sameDomain" />
              <param name="movie" value="[URL unfurl="true"]http://10.1.1.3/test.swf">[/URL]
              <param name="wmode" value="transperant">
              <param name="quality" value="high">
			  <PARAM NAME=bgcolor VALUE=#FFFFFF>
              <embed src="test.swf" wmode="transparent"  quality="high" width="554" height="200" name="menu" align="left" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="[URL unfurl="true"]http://www.macromedia.com/go/getflashplayer"></embed>[/URL]
        </object>
      </td>
  </tr>
</table>
</div>


Here is the main homepage.cfm

Code:
<body bgcolor="#CCCCCC">
<cfinclude template="header.cfm">
<table align="center" width="792"  border="1" cellpadding="0" cellspacing="0" bordercolor="#000000" bgcolor="#FFFFFF">
<tr>
<td>

<table width="791" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
  <tr>
    <td width="554" valign="top"><cfinclude template="main.cfm"></td>
    <td width="1" class="RightBorder">&nbsp;</td>
    <td width="236"  align="right" valign="top"><cfinclude template="sidenav.cfm"></td>
  </tr>
</table>
<cfinclude template="footer.cfm">
</td>
  </tr>
</table>
</body>

I think if you just cut and paste this code in dreaamweaver...you will see what it looks like sort of.
 
hmm, may not do anything but change the z-index to a higher number like 100

[conehead]
 
I think i figured it out...the flash has to be one layer, header another layer and body a third layer, and then things works correctly. Thanks a lot.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top