Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Mouse Wheel Not working in a Browser

Guest
Apr 06, 2010 Apr 06, 2010

I'm using AS3 and created a MOUSE WHEEL EventListener. It works fine when testing in the Flash authoring program...but not in the browser.

(except In IE...which I found odd).

I have looked around in different forums and many people have this problem and explanations on why it doesn't work.

I believe the problem cannot be solved in Flash...but through JavaScript.

So my question is...does anyone have a JavaScript code that would make this work?

Thanks

appreciate it

TOPICS
ActionScript
3.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 06, 2010 Apr 06, 2010

are you using an html embedding file published by the flash program?  if so, what's the url and what browser has a problem?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 06, 2010 Apr 06, 2010

Yes...I used the Flash html file

here is the code. I tried it in FireFox (the most recent version) and in Google Chrome

<script language="JavaScript" type="text/javascript">

AC_FL_RunContent(

'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0',

'width', '100%',

'height', '100%',

'src', 'test',

'quality', 'high',

'pluginspage', 'http://www.adobe.com/go/getflashplayer',

'align', 'middle',

'play', 'true',

'loop', 'true',

'scale', 'noscale',

'wmode', 'transparent',

'devicefont', 'false',

'id', 'test',

'bgcolor', '#ffffff',

'name', 'test',

'menu', 'true',

'allowFullScreen', 'false',

'allowScriptAccess','sameDomain',

'movie', 'test',

'salign', 'l'

); //end AC code

</script>

<noscript>

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="100%" height="100%" id="test" align="middle">

<param name="allowScriptAccess" value="sameDomain" />

<param name="allowFullScreen" value="false" />

<param name="movie" value="test.swf" /><param name="quality" value="high" /><param name="scale" value="noscale" /><param name="salign" value="l" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" /> <embed src="test.swf" quality="high" scale="noscale" salign="l" wmode="transparent" bgcolor="#ffffff" width="100%" height="100%" name="test" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />

</object>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 06, 2010 Apr 06, 2010

what's the url of your embedding html?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 06, 2010 Apr 06, 2010

Kglad,

I'm not sure what you mean by URL

when I publish the SWF..it outputs the html file as well..I was viewing it from my hard drive.

hope that answers  your question.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 06, 2010 Apr 06, 2010

Okay I found somewhat of a solution...

by using a

stage.addEventListener(MouseEvent.MOUSE_OVER, onOver);

and then my function

and then create another event listener inside the function such as

stage.addEventListener(MouseEvent.MOUSE_WHEEL, onWheel);

and you can't be in transparent mode either. You have to be in 'window mode'

but then the problems becomes if  your browser ends up having a vertical scroll bar.

then the Mouse Wheel controls both the browser and the flash scroll bar.

I'll get back with you guys if I find a solution to this too.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 06, 2010 Apr 06, 2010
LATEST
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines