Mrz
15

Flash ComboBox closes unexpectedly with FP 9 & 10

By Hannes  //  Zeugs  //  No Comments

Nachdem ich kürzlich doch einmal eine Flash Komponente zum Einsatz gebracht habe, musst ich leider gegen meine Annahmen feststellen, dass die Combobox einen recht gravierenden Bug hat.
Immer wenn der Scrollbar verwendet wird, schließt sich die Combobox, und es ist keine Auswahl mehr möglich. Wird die Combobox dann wieder geöffnet, steht der Inhalt an derselben Stelle wie vor dem Scrollen. Nach ein bisschen Gesuche im Internet bin ich auf eine Lösung von Imran gestoßen, die tadellos funktioniert.

/*
* Modify the ScrollThumb SimpleButton class so that combobox doesn’t close
* when scroll controls are used if it’s contained in a swf which is
* loaded within a container swf (bug within flash V2 combobox component)
*/
 
mx.controls.scrollClasses.ScrollThumb.prototype.onRelease = function(Void):Void {
//this._parent.releaseFocus();
this.stopDragThumb();
this.super.onRelease();
}
 
mx.controls.scrollClasses.ScrollThumb.prototype.onReleaseOutside = function(Void):Void {
//this._parent.releaseFocus();
this.stopDragThumb();
this.super.onReleaseOutside();
}
 
mx.controls.SimpleButton.prototype.onRelease = function(Void):Void {
//this.releaseFocus();
this.phase = 'rollover';
if (this.interval != undefined) {
clearInterval(this.interval);
delete this.interval;
}
 
if (this.getToggle()) {
this.setState(!getState());
} else {
this.refresh();
}
this.dispatchEvent({type:'click'});
}
 
mx.controls.SimpleButton.prototype.onReleaseOutside = function(Void):Void {
//this.releaseFocus();
this.phase='up';
if (this.interval != undefined) {
clearInterval(this.interval);
delete this.interval;
}
}

Dankeschön für diesen schönen Bugfix.

(via)

Gib deinen Senf ab

Letzte Tweets

Archiv