Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 30th, 2004, 08:57 AM
civic3x98 civic3x98 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: Houston, Tx
Posts: 22 civic3x98 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to civic3x98 Send a message via Yahoo to civic3x98
Floating layer, control in table

I have a flash movie that is placed in a layer which will float with the page as it is scrolled.

In the js it allows the developer to specify the X and Y coords where the layer should display.

What I need...

I have a table with two rows. The top row contains my navigation, and the bottom cell I want to hold the layer. I want the verticle (Y) to not be positioned to the top of the browser, but to the top of the table cell that it is in.

How can I do this? The code is below.

Code:

<body bgcolor="#ffffff">


<div id="divStayTopLeft" style="position:absolute">

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="200" height="400" id="quotesScroller" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="quotesScroller.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="quotesScroller.swf" quality="high" bgcolor="#ffffff" width="200" height="400" name="quotesScroller" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>

</div>
<script type="text/javascript">
function JSFX_FloatTopLeft()
{
var startX = 25, startY = 400;
var ns = (navigator.appName.indexOf("Netscape") != -1);
var d = document;
var px = document.layers ? "" : "px";
function ml(id)
{
var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
if(d.layers)el.style=el;
el.sP=function(x,y){this.style.left=x+px;this.style.top=y+px;};
el.x = startX; el.y = startY;
return el;
}
window.stayTopLeft=function()
{
var pY = ns ? pageYOffset : document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop;
ftlObj.y += (pY + startY - ftlObj.y)/8;
ftlObj.sP(ftlObj.x, ftlObj.y);
setTimeout("stayTopLeft()", 40);
}
ftlObj = ml("divStayTopLeft");
stayTopLeft();
}
JSFX_FloatTopLeft();
</script>





</body>

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > Floating layer, control in table


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT