moon30 / as3gif

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

Bugs to know: #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Please change this in the GIFPlayer class:

private function update ( pEvt:TimerEvent ) :void
{
var delay:int = aFrames[ iIndex = iInc++ % arrayLng ].delay;

pEvt.target.delay = ( delay > 0 ) ? delay : 100;

switch ( gifDecoder.disposeValue ) 
{
case 0:
    if ( !iIndex ) bitmapData = aFrames[ 0 ].bitmapData.clone();
    bitmapData.draw ( aFrames[ iIndex ].bitmapData );
    break;
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
] ) );
}

+ in the readSteam() method before event dispatching add this lines plz:

__width = aFrames[0].bitmapData.rect.width;
__height = aFrames[0].bitmapData.rect.height;
dispatchEvent(new GIFPlayerEvent ( GIFPlayerEvent.COMPLETE ,
aFrames[0].bitmapData.rect));

__width, __height - create override methods for them. Usability grows ^_^

Cheers, Jloa

Original issue reported on code.google.com by julious....@gmail.com on 12 Feb 2009 at 12:07