[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Mousewheel not working in combobox as2

Posted on 2010-08-27
2
Medium Priority
?
901 Views
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);
}
}
Mouse.addListener(mouseListener);

function cbUpdate() {
choice = _root.comboBox.getSelectedItem().data;
_root.gotoAndPlay(change);
}
_root.comboBox.setChangeHandler("change");

_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

0
Comment
Question by:toiler
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
JohnHowlett earned 1000 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...."

http://www.zedia.net/2007/mouse-wheel-problems-and-no-answer/



The only answer is to go to AS3.
0
 

Author Comment

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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
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.
Suggested Courses

650 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