PDA

View Full Version : ComboBox closing on scroll.


japabr
04-26-2008, 01:51 AM
Hi all

I have a form with a COMBOBOX component on it.
and i load this form via LoadMovie() sicne it opens up in a PopUp style.

The point is that when i try to scroll the items from the dropdown, it keeps closing when I scroll down to select any item from that combobox.

The movie can be found at: http://www.nichiyuinternational.com/demo/

go to "PASSAGENS AÉREAS" then click at "RESERVAS" then try to select an item from the "COMPANHIAS".

Tks in advance.

Sleeve
05-01-2008, 05:21 PM
That is a strange error. Is that an AS2 combobox?

japabr
05-02-2008, 01:11 AM
yes it is, and its reallly strange cuz i have the same combobox on the same webpage at CONTATO and it works flawless...

Sleeve
05-02-2008, 01:31 AM
have you tried another combobox? Maybe this one? http://www.actionscript.org/forums/showthread.php3?t=138407

japabr
05-17-2008, 01:06 AM
Hi Sleev didnt work for me, i wonder why is it happening, i tried to find something about it on Flash's Help but no luck, is there any way to fix it with ACTIONSCRIPT?

I need help preety badly since my deadline already due :S


Tks in advance

japabr
05-19-2008, 04:36 AM
I've found how to fix that problem, i've just added the following code on my as layer above the combobox frame:

mx.controls.scrollClasses.ScrollThumb.prototype.on Release = function(Void):Void {
this.stopDragThumb();
this.super.onRelease();
horarioCB.drawFocus = "";
horarioCB.dropdown.drawFocus = "";
assuntoCB.drawFocus = "";
assuntoCB.dropdown.drawFocus = "";
}

mx.controls.scrollClasses.ScrollThumb.prototype.on ReleaseOutside = function(Void):Void {

this.stopDragThumb();
this.super.onReleaseOutside();
horarioCB.drawFocus = "";
horarioCB.dropdown.drawFocus = "";
assuntoCB.drawFocus = "";
assuntoCB.dropdown.drawFocus = "";
}

mx.controls.SimpleButton.prototype.onRelease = function(Void):Void {

this.phase = "rollover";
if (this.interval != undefined) {
clearInterval(this.interval);
delete this.interval;
horarioCB.drawFocus = "";
horarioCB.dropdown.drawFocus = "";
assuntoCB.drawFocus = "";
assuntoCB.dropdown.drawFocus = "";
}

if (this.getToggle()) {
this.setState(!getState());
} else {
this.refresh();
}
this.dispatchEvent({type:"click"});
}

mx.controls.SimpleButton.prototype.onReleaseOutsid e = function(Void):Void {

this.phase="up";
if (this.interval != undefined) {
clearInterval(this.interval);
delete this.interval;
horarioCB.drawFocus = "";
horarioCB.dropdown.drawFocus = "";
assuntoCB.drawFocus = "";
assuntoCB.dropdown.drawFocus = "";
}
}


So if someone else is having the same problem, there's the solution... I just wonder why this error occurs...

Peace