cjpendola / as3gif

Automatically exported from code.google.com/p/as3gif
0 stars 0 forks source link

BUG HERE #6

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
this version has a Bug in GIFPlayer.as
private function update( pEvt : TimerEvent ) : void {
    var delay : int = aFrames[ iIndex = iInc++ % arrayLng ].delay;
    pEvt.target.delay = ( delay > 0 ) ? delay : 100;
      /*look here..gifDecoder.disposeValue is a Number means this is a single
disposeValue  in the gif,but it's a fault,not everyone.every Frame has her
disponseValue.so i think it's a bug.
Fst: GIFFrame.as
public var disposeValue:int;
public function GIFFrame( _pImage:BitmapData, _pDelay:int,_pdisponse:int){
    bitmapData = _pImage;
    delay = _pDelay;
    disposeValue = _pdisponse;  
}
second:GIFDecoder.as
frames.push ( new GIFFrame (bitmap, delay,dispose) ); // add image to frame
list
final:GIFPlayer.as
private function update ( pEvt:TimerEvent ) :void{
    var delay:int = aFrames[ iIndex = iInc++ % arrayLng ].delay;        
    pEvt.target.delay = ( delay > 0 ) ? delay : 100;
    switch ( aFrames[ iIndex ].disposeValue ) 
*/
    switch ( gifDecoder.disposeValue ) {
            case 1:
        if ( !iIndex ) bitmapData = aFrames[ 0 ].bitmapData.clone();
                bitmapData.draw(aFrames[ iIndex ].bitmapData);
        break;
        case 2:
        bitmapData = aFrames[ iIndex ].bitmapData;
        break;
        }   
    dispatchEvent(new FrameEvent(FrameEvent.FRAME_RENDERED, aFrames[ iIndex ]));
        }

Original issue reported on code.google.com by gooooooo...@gmail.com on 24 Aug 2009 at 7:23

Attachments: