...

View Full Version : javascript div and flash under mac



steff
10-07-2004, 10:27 AM
Hello

I want to put a flash animation into a div to hide and show via Javascript.

First time, I go to the page my "flash div" is hidde then when I click on button it appears.

But under Mac, it appears when I come to the page.

Can you help me?
Thanks
Cordially
Steff
svauclaire@atelierregence.com

jamescover
10-07-2004, 10:54 AM
Hello

I want to put a flash animation into a div to hide and show via Javascript.

First time, I go to the page my "flash div" is hidde then when I click on button it appears.

But under Mac, it appears when I come to the page.

Can you help me?
Thanks
Cordially
Steff
svauclaire@atelierregence.com


Not if you don't post the code you're using to embed the movie...



-james

steff
10-08-2004, 09:55 AM
Hello

I began with code found under walterzorn.com

Then It becomes

<HTML>
<HEAD>
<STYLE type=text/css>
#greylyr { BORDER-RIGHT: #000099 1px solid; BORDER-TOP: #000099 1px solid; BACKGROUND: #eeeeee; LEFT: 6px; VISIBILITY: hidden; OVERFLOW: hidden; BORDER-LEFT: #000099 1px solid; WIDTH: 134px; BORDER-BOTTOM: #000099 1px solid; POSITION: absolute; TOP: 380px; layer-background-color: #eeeeee }
#ingreylyr { PADDING-RIGHT: 3px; PADDING-LEFT: 3px; PADDING-BOTTOM: 3px; PADDING-TOP: 3px }
#greylyr2 { BORDER-RIGHT: #000099 1px solid; BORDER-TOP: #000099 1px solid; BACKGROUND: #ff0000; LEFT: 6px; VISIBILITY: hidden; OVERFLOW: hidden; BORDER-LEFT: #000099 1px solid; WIDTH: 250px; HEIGHT: 250px; BORDER-BOTTOM: #000099 1px solid; POSITION: absolute; TOP: 380px; layer-background-color: #ff0000 }
#ingreylyr2 { PADDING-RIGHT: 3px; PADDING-LEFT: 3px; PADDING-BOTTOM: 3px; PADDING-TOP: 3px }
</STYLE>


</head>

<BODY bgColor=#ffffff>
<SCRIPT src="wz_dragdrop.js" type=text/javascript></SCRIPT>

<DIV id=greylyr>
<CENTER>
<IMG height=17 alt="Drag Drop JavaScript" src="button_outset.gif" width=60 name=button>
</CENTER>
<BR>
<SMALL>
wz_dragdrop.js provides extended DHTML capabilities...
<BR>&nbsp;
<BR>...even for images nested into layers (DIV elements).
<BR>&nbsp;
<BR>Just a few simple additional function (method) calls were necessary to implement the functionalities of this button.
<BR>&nbsp;
<BR>&nbsp;
<BR>&nbsp;
</SMALL>
</DIV>

<DIV id=greylyr2>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" width="175">
<tr>
<td>
<IMG height=17 alt="Drag Drop JavaScript" src="button2_outset.gif" width=60 name=button2>
</td>
</tr>
<TR>
<TD>
<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="250" HEIGHT="250" id="contact" ALIGN="">
<PARAM NAME=movie VALUE="contact.swf"> <PARAM NAME=quality VALUE=best> <PARAM NAME=bgcolor VALUE=#D7253C> <EMBED src="contact.swf" quality=best bgcolor=#D7253C WIDTH="250" HEIGHT="250" NAME="contact" ALIGN=""
TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>
</TD>
</TR>
</TABLE>
</DIV>

<SCRIPT type=text/javascript>
<!--
SET_DHTML(CURSOR_MOVE, RESIZABLE, NO_ALT, SCROLL, "button"+VERTICAL+HORIZONTAL+CURSOR_DEFAULT, "greylyr", "button2"+VERTICAL+HORIZONTAL+CURSOR_DEFAULT, "greylyr2");



function my_DropFunc()
{
if (dd.obj.name == 'button')
{
dd.obj.swapImage(outsetbutton.src);
var minh = dd.elements.button.h+((dd.elements.button.y-dd.elements.greylyr.y)<<1);
dd.elements.greylyr.resizeTo(dd.elements.greylyr.w,(dd.elements.greylyr.h != minh)? minh : 300);
}
if (dd.obj.name == 'button2')
{
dd.obj.swapImage(outsetbutton2.src);
var minh2 = dd.elements.button2.h+((dd.elements.button2.y-dd.elements.greylyr2.y)<<1);
dd.elements.greylyr2.resizeTo(dd.elements.greylyr2.w,(dd.elements.greylyr2.h != minh2)? minh2 : 300);
}
}

var outsetbutton = new Image();
outsetbutton.src = 'button_outset.gif';
var insetbutton = new Image();
insetbutton.src = 'button_outset.gif';
dh = 12
dd.elements.greylyr.moveTo(0,0);
dd.elements.greylyr.show();

var outsetbutton2 = new Image();
outsetbutton2.src = 'button2_outset.gif';
var insetbutton2 = new Image();
insetbutton2.src = 'button2_outset.gif';
dh = 12
dd.elements.greylyr2.moveTo(200,0);
dd.elements.greylyr2.show();
//-->

</SCRIPT>

</BODY>
</HTML>

so is it more explicit?

thanks for your help

steff

Willy Duitt
10-08-2004, 12:56 PM
You can check here (http://www.webdeveloper.com/forum/showthread.php?s=&threadid=46064)....

.....Willy



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum