Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Javascript control on Safari with Flash 7 and 8



My friend asked me this but I could not figure out why. Below is a html page and include some javascript to control the play and rewind of the swf file shape.swf. It works in Safari with Falsh plug-in 8 installed but could not work with Flash 7 (would report that obj.play is not a recognized object etc).

I also tried it with FireFox 1.5.0 (Flash 8 plug-in) and it also reports obj.play is not a function. Can anyone help point out what is the problem?

Thanks,

Leon



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd";>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset= ISO-8859-1" >


<script type="text/javascript">

	function playFlash()
	{
		var obj = document.getElementById("ebooksysflashcontrol");
		obj.Play();
	}

	function stopFlash()
	{
		var obj = document.getElementById("ebooksysflashcontrol");
		obj.Rewind();
		
	}
</script>
	
</head>
<body>

<object
id="ebooksysflashcontrol"
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/ swflash.cab#version=6,0,29,0"
width="550" height="400">
<param name="movie" value="shape.swf">
<param name="quality" value="high">
<PARAM NAME="PLAY" VALUE="false">
<PARAM NAME="LOOP" VALUE="false">
<PARAM NAME="MENU" VALUE="true">
<embed name="ebooksysflashcontrol" src="shape.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"; type="application/x-shockwave-flash" PLAY="false" LOOP="false" MENU="true" QUALITY="high" width="550" height="400">
</embed>
</object>
<hr >


<form action="#">
<input type="button" name="Button1" value="Start Flash" onclick="playFlash();" >
<input type="button" name="Button2" value="Stop Flash" onclick="stopFlash();" >
</form>


</body>
</html>

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Web-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/web-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.