[BUG] [FIX] Can't play SWF files
Michael Rueger
Michael.Rueger.-ND at disney.com
Fri Nov 5 18:29:42 UTC 1999
--------------750BF584167A9405213114CC
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Mark Guzdial wrote:
>
> I should have tested this before sending out my earlier email, but now that
> I have some SWF files on disk (Thanks, Ivan, for the method, and David
Are these Flash 4 swf files?
Squeak can't read all swf version 4 files, but with the attached fix you
should be able to read some at least.
Michael
--
"To improve is to change, to be perfect is to change often."
Winston Churchill
+------------------------------------------------------------+
| Michael Rueger |
| Phone: ++1 (818) 623 3283 Fax: ++1 (818) 623 3559 |
+--------Michael.Rueger.-ND at online.disney.com----------------+
--------------750BF584167A9405213114CC
Content-Type: text/plain; charset=us-ascii;
name="FlashFileReader-processMorphFillStylesFrom.st"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="FlashFileReader-processMorphFillStylesFrom.st"
'From Squeak 2.5 of August 6, 1999 on 2 November 1999 at 5:08:34 pm'!
!FlashFileReader methodsFor: 'processing morphs' stamp: 'mir 11/2/1999 17:05'!
processMorphFillStylesFrom: data
| nFills nColors rampIndex rampColor id fillStyleType color1 color2 matrix1 matrix2 ramp1 ramp2 |
nFills _ data nextByte.
nFills = 255 ifTrue:[nFills _ data nextWord].
log ifNotNil:[log crtab; print: nFills; nextPutAll:' New fill styles'].
1 to: nFills do:[:i|
log ifNotNil:[log crtab: 2; print: i; nextPut:$:; tab].
fillStyleType _ data nextByte.
(fillStyleType = 0) ifTrue:["Solid fill"
color1 _ data nextColor: true.
color2 _ data nextColor: true.
self recordMorphFill: i color1: color1 color2: color2.
log ifNotNil:[log nextPutAll:'solid color '; print: color1; nextPutAll:' -- '; print: color2].
].
(fillStyleType anyMask: 16) ifTrue:["Gradient fill"
"Read gradient matrix"
matrix1 _ data nextMatrix.
matrix2 _ data nextMatrix.
"Read color ramp data"
nColors _ data nextByte.
ramp1 _ Array new: nColors.
ramp2 _ Array new: nColors.
log ifNotNil:[log nextPutAll:'Gradient fill with '; print: nColors; nextPutAll:' colors'].
1 to: nColors do:[:j|
rampIndex _ data nextByte.
rampColor _ data nextColor: true.
ramp1 at: j put: (rampIndex -> rampColor).
rampIndex _ data nextByte.
rampColor _ data nextColor: true.
ramp2 at: j put: (rampIndex -> rampColor)].
self recordMorphFill: i matrix1: matrix1 ramp1: ramp1 matrix2: matrix2 ramp2: ramp2 linear: (fillStyleType = 16).
fillStyleType _ 0].
(fillStyleType anyMask: 16r40) ifTrue:["Bit fill"
"Read bitmap id"
id _ data nextWord.
"Read bitmap matrix"
matrix1 _ data nextMatrix.
matrix2 _ data nextMatrix.
log ifNotNil:[log nextPutAll:'Bitmap fill id='; print: id].
self recordMorphFill: i matrix1: matrix1 matrix2: matrix2 id: id clipped: (fillStyleType anyMask: 1).
fillStyleType _ 0].
fillStyleType = 0 ifFalse:[self error:'Unknown fill style: ',fillStyleType printString].
self flushLog.
].! !
--------------750BF584167A9405213114CC
Content-Type: text/plain; charset=us-ascii;
name="FlashFileReader-maximumSupportedVersion.st"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="FlashFileReader-maximumSupportedVersion.st"
'From Squeak 2.5 of August 6, 1999 on 5 November 1999 at 10:28:44 am'!
!FlashFileReader methodsFor: 'private' stamp: 'mir 11/3/1999 15:25'!
maximumSupportedVersion
^4! !
--------------750BF584167A9405213114CC--
More information about the Squeak-dev
mailing list
|