Mousewheel not working in combobox as2

Posted on 2010-08-27
Last Modified: 2013-11-11
I am using a combobox as a menu in my .swf to get to different frames at my timeline. I have aprox 20 different labels. And everything work exept for the mouse wheel. I can not scroll the combobox with my mouse wheel, i can use the scrollbar but not the wheel.   I will be glad if somenone can enlighting me on this.

this.createClassObject(mx.controls.ComboBox, "comboBox", 10);

comboBox.setStyle("themeColor", "0xFF0000");

var mouseListener:Object = new Object();

mouseListener.onMouseWheel = function(delta) {

if ((delta > 0 && box_mc._y < 270) || (delta < 0 && box_mc._y > 0)) {

box_mc._y = box_mc._y + (delta * 3);




function cbUpdate() {

choice = _root.comboBox.getSelectedItem().data;




_root.comboBox.addItem("Velg et sted", "");

_root.comboBox.addItem("Asker", "Asker");

_root.comboBox.addItem("Askøy", "Askøy");

_root.comboBox.addItem("Bergen", "Bergen");

_root.comboBox.addItem("Bryne", "Bryne");

_root.comboBox.addItem("Elverum", "Elverum");

_root.comboBox.addItem("Fredrikstad", "Fredrikstad");

_root.comboBox.addItem("Gjøvik", "Gjøvik");

_root.comboBox.addItem("Grimstad", "Grimstad");

_root.comboBox.addItem("Hamar", "Hamar");

_root.comboBox.addItem("Horten", "Horten");

_root.comboBox.addItem("Hønefoss", "Hønefoss");

_root.comboBox.addItem("Kongsberg", "Kongsberg");

_root.comboBox.addItem("Jessheim", "Jessheim");

_root.comboBox.addItem("Kristiansand", "Kristiansand");

_root.comboBox.addItem("Krokstadelva", "Krokstadelva");

_root.comboBox.addItem("Lamberseter", "Lamberseter");

_root.comboBox.addItem("Lierskogen", "Lierskogen");

_root.comboBox.addItem("Lillehammer", "Lillehammer");

_root.comboBox.addItem("Lillestrøm", "Lillestrøm");

_root.comboBox.addItem("Lørenskog", "Lørenskog");

_root.comboBox.addItem("Moss", "Moss");

_root.comboBox.addItem("Oslo", "Oslo");

_root.comboBox.addItem("Sandnes", "Sandnes");

_root.comboBox.addItem("Sarpsborg", "Sarpsborg");

_root.comboBox.addItem("Ski", "Ski");

_root.comboBox.addItem("Stavanger", "Stavanger");

_root.comboBox.addItem("Steinkjer", "Steinkjer");

_root.comboBox.addItem("Trondheim", "Trondheim");

_root.comboBox.addItem("Tønsberg", "Tønsberg");

Open in new window

Question by:toiler

Accepted Solution

JohnHowlett earned 250 total points
ID: 33540430
I remember having this problem with AS2 and there wasn't really an answer.

"...there is no mouseWheel event on MovieClips, you have to use the global object Mouse to catch the mouse wheel...."

The only answer is to go to AS3.

Author Comment

ID: 33543210
Thank you a lot for helping me decide to stop wasting more time on this issue. I found a workaround for this.

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now