gsb wrote:[color=blue]
> I'd like to get the offset coordinates, top & left, of an embedded Flash
> movie.
>
> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
>
> codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.ca
> b#version=7,0,14,0"
> id="tabMenu" width="720" height="420">
> <param name="movie" value="tabMenu.swf">
> <param name="menu" value="false">
> <param name="quality" value="best">
> <param name="wmode" value="opaque">
> <param name="base" value="file://C:/WINDOWS/Desktop/031122a/">
> <param name="bgcolor" value="#FFFFFF">
> <param name="allowScriptAccess" value="sameDomain">
> <embed id="tabMenu" name="tabMenu" src="tabMenu.swf"
> menu="false" quality="best" wmode="opaque"
> base="file://C:/WINDOWS/Desktop/031122a/" bgcolor="#FFFFFF"
> swLiveConnect="true" allowScriptAccess="sameDomain"
> width="720" height="420"
> type="application/x-shockwave-flash"
> pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>
> </object>
>
> I'm using Netscape 7.1.
>
> document.tabmenu.offsetLeft and document.tabmenu.offsetTop don't seem to do
> it correctly.
>[/color]
document.getElementById("tabMenu").offsetLeft
and
document.getElementById("tabMenu").offsetTop
will give the offset values relative to its offsetParent, not necessarly
relative to the document or the browser viewport. offset[Left/Top] is
always relative to the offsetParent node, the node which acts like the
positional context of inner nodes ("offsetParent node: closest
positioned containing element within the DOM node containment hierarchy").
To reference an element, use document.getElementById or another DOM 1
method.
I recommend you read these:
Using Web Standards in Your Web Pages:
Accessing Elements with the DOM
http://www.mozilla.org/docs/web-deve...tml#dom_access
Updating DHTML Web Pages for next generation browsers
http://devedge.netscape.com/viewsour...tml-web-pages/
DU
[color=blue]
> Any help will be appreciated.
>
> Thanks
>
> gsb
>
>[/color]