header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
Mitch
Points:30
Posts:0

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>




Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 4+5 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions