navoff
11-24-2003, 10:39 PM
I've got a page I'm trying to develop that will pop up a window with a .swf file. The .swf file morphs one image to another. I created the .swf file with a freeware program (WinMorph). I want to give the user the option of clicking a button to rewind and replay the .swf file. I know that you can right click the image and do it that way but not everyone who might access the page would necessarily know that. I'd like some advice on how to create some javascript code to add the rewiind/replay buttons. Here's a copy of what I have so far (not sure if this will display well):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Kitchen-Dining Room Makeover</title>
<script language="javascript">
function Start(page,height,width){
OpenWin = this.open("","Images","toolbar=no,directories=no,status=no,scollbars=no,resizable=no,width=400,height=500,top=50,left=50");
OpenWin.document.open();
OpenWin.document.write('<title>Image Window</title><body bgcolor="#FFFFFF"><center><object><PARAM NAME="autostart" VALUE="true"><embed src="'+page+'" height="'+height+'" width="'+width+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" quality="best" play="true" loop="false"></object><P><form><input type="button" value="Close Window" onClick="window.close()"></form></center></body>')
OpenWin.document.close();
}
</script>
</head>
<body>
<h1>Kitchen-Dining Room Makeover</h1>
<a href="javascript:Start('KD-1.swf','360','240')" ;>View 1</A>
<BR>
<a href="javascript:Start('KD-2.swf','240','360')" ;>View 2</A>
<BR>
<a href="javascript:Start('KD-3.swf','360','240')" ;>View 3</A>
<BR>
<a href="javascript:Start('KD-4.swf','240','360')" ;>View 4</A>
<BR>
<a href="javascript:Start('KD-5.swf','240','360')" ;>View 5</A>
<BR>
<a href="javascript:Start('KD-6.swf','240','360')" ;>View 6</A>
<BR>
<a href="javascript:Start('KD-7.swf','360','240')" ;>View 7</A>
<BR>
<a href="javascript:Start('KD-8.swf','360','240')" ;>View 8</A>
<BR>
<a href="javascript:Start('KD-9.swf','360','240')" ;>View 9</A>
<BR>
<script language="JavaScript" type="text/javascript">
<!--
document.write("Last Modified " + document.lastModified)
// -->
</script>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Kitchen-Dining Room Makeover</title>
<script language="javascript">
function Start(page,height,width){
OpenWin = this.open("","Images","toolbar=no,directories=no,status=no,scollbars=no,resizable=no,width=400,height=500,top=50,left=50");
OpenWin.document.open();
OpenWin.document.write('<title>Image Window</title><body bgcolor="#FFFFFF"><center><object><PARAM NAME="autostart" VALUE="true"><embed src="'+page+'" height="'+height+'" width="'+width+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" quality="best" play="true" loop="false"></object><P><form><input type="button" value="Close Window" onClick="window.close()"></form></center></body>')
OpenWin.document.close();
}
</script>
</head>
<body>
<h1>Kitchen-Dining Room Makeover</h1>
<a href="javascript:Start('KD-1.swf','360','240')" ;>View 1</A>
<BR>
<a href="javascript:Start('KD-2.swf','240','360')" ;>View 2</A>
<BR>
<a href="javascript:Start('KD-3.swf','360','240')" ;>View 3</A>
<BR>
<a href="javascript:Start('KD-4.swf','240','360')" ;>View 4</A>
<BR>
<a href="javascript:Start('KD-5.swf','240','360')" ;>View 5</A>
<BR>
<a href="javascript:Start('KD-6.swf','240','360')" ;>View 6</A>
<BR>
<a href="javascript:Start('KD-7.swf','360','240')" ;>View 7</A>
<BR>
<a href="javascript:Start('KD-8.swf','360','240')" ;>View 8</A>
<BR>
<a href="javascript:Start('KD-9.swf','360','240')" ;>View 9</A>
<BR>
<script language="JavaScript" type="text/javascript">
<!--
document.write("Last Modified " + document.lastModified)
// -->
</script>
</body>
</html>