Posted By

b121417 on 03/26/10


Tagged

flash as2


Versions (?)

AS2 ComboBox ScrollBar fix


 / Published in: ActionScript
 

This is to prevent ComboBox from closing when onRelease on scrollBar

  1. mx.controls.scrollClasses.ScrollThumb.prototype.onRelease = function(Void):Void {
  2. //this._parent.releaseFocus();
  3. this.stopDragThumb();
  4. this.super.onRelease();
  5. }
  6.  
  7. mx.controls.scrollClasses.ScrollThumb.prototype.onReleaseOutside = function(Void):Void {
  8. //this._parent.releaseFocus();
  9. this.stopDragThumb();
  10. this.super.onReleaseOutside();
  11. }
  12.  
  13. mx.controls.SimpleButton.prototype.onRelease = function(Void):Void {
  14. //this.releaseFocus();
  15. this.phase = "rollover";
  16. if (this.interval != undefined) {
  17. clearInterval(this.interval);
  18. delete this.interval;
  19. }
  20.  
  21. if (this.getToggle()) {
  22. this.setState(!getState());
  23. } else {
  24. this.refresh();
  25. }
  26. this.dispatchEvent({type:"click"});
  27. }
  28.  
  29. mx.controls.SimpleButton.prototype.onReleaseOutside = function(Void):Void {
  30. //this.releaseFocus();
  31. this.phase="up";
  32. if (this.interval != undefined) {
  33. clearInterval(this.interval);
  34. delete this.interval;
  35. }
  36. }

Report this snippet  

You need to login to post a comment.