Skip to content

Commit

Permalink
Flash: In effort to resolve random freeze problem in FP11 - simplify …
Browse files Browse the repository at this point in the history
…BitmapDataUnlimited event dispatching model (was not dispatching complete event properly). Related #421.
  • Loading branch information
jayarjo committed Nov 26, 2011
1 parent e2eb226 commit 003f941
Showing 1 changed file with 1 addition and 38 deletions.
39 changes: 1 addition & 38 deletions src/flash/plupload/src/com/formatlos/BitmapDataUnlimited.as
Expand Up @@ -31,7 +31,6 @@ package com.formatlos
import flash.display.Loader;
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.events.IEventDispatcher;
import flash.geom.ColorTransform;
import flash.geom.Matrix;
import flash.geom.Point;
Expand Down Expand Up @@ -86,12 +85,11 @@ package com.formatlos
* </div>
*
*/
public class BitmapDataUnlimited implements IEventDispatcher
public class BitmapDataUnlimited extends EventDispatcher
{
// basically this value is 4096, but take 4000 to have some buffer
static private const DRAW_LIMIT : uint = 4000;

protected var _eventDispatcher : EventDispatcher;
private var _loader : Loader;
private var _gif : Gif;
private var _fillColor : uint;
Expand All @@ -112,14 +110,6 @@ package com.formatlos
}


/**
* Creates a new BitmapDataUnlimited object.
*/
public function BitmapDataUnlimited()
{
_eventDispatcher = new EventDispatcher(this);
}

/**
* Creates a huge BitmapData object.
*
Expand Down Expand Up @@ -259,33 +249,6 @@ package com.formatlos
{
dispatchEvent(new BitmapDataUnlimitedEvent(BitmapDataUnlimitedEvent.COMPLETE));
}


public function addEventListener(type : String, listener : Function, useCapture : Boolean = false, priority : int = 0, useWeakReference : Boolean = true) : void
{
_eventDispatcher.addEventListener(type, listener, useCapture, priority, useWeakReference);
}

public function dispatchEvent(event : Event) : Boolean
{
return _eventDispatcher.dispatchEvent(event);
}

public function hasEventListener(type : String) : Boolean
{
return _eventDispatcher.hasEventListener(type);
}

public function removeEventListener(type : String, listener : Function, useCapture : Boolean = false) : void
{
_eventDispatcher.removeEventListener(type, listener, useCapture);
}

public function willTrigger(type : String) : Boolean
{
return _eventDispatcher.willTrigger(type);
}


}
}

0 comments on commit 003f941

Please sign in to comment.