12/1/2010 7:50:07 AM
Title:
Pixelbreaker's mouse wheel code
Hi I'm using Pixelbreaker's macmousewheel javascript library for a Flash AS2 project and I'm a bit stumped on how to get the JS working in the html. The following is a working example from the pixelbreaker website - all good. However I'm not using swfObject and rather the < object > tag that the Flash (CS5) IDE publishes with.
How Could I insert the "var macmousewheel = new SWFMacMouseWheel( attributes.id )" line into my html that uses the object tag? (my object code below below)
Thanks!
Pixelbreaker's code
<script type="text/javascript">
var flashvars = {
test: 'test'
};
var params = {
allowfullscreen: "true"
};
var attributes = {
id: "site"
};
if (swfobject.hasFlashPlayerVersion("8.0.0")) {
var macmousewheel = new SWFMacMouseWheel( attributes.id );
swfobject.embedSWF("preview.swf", "content", "100%", "100%", "8.0.0", "expressInstall.swf", flashvars, params, attributes);
}
</script>
my code:
<object id='mySWF' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' width='100%' height='100%'>
<param name='movie' value='index.swf'>
<param name='allowfullscreen' value='true'>
<param name='bgcolor' value='#919191'>
<!--[if !IE]>-->
<object type='application/x-shockwave-flash' data='index.swf' width='100%' height='100%'>
<param name='allowfullscreen' value='true'>
<param name='bgcolor' value='#919191'>
<!--<![endif]-->
<a href="http://www.adobe.com/go/getflashplayer">Get Flash</a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>