Brian Williams | 10 Apr 2007 16:22
Picon

Bitmap filter effects on buttons

I'd love to use swfmill to assemble our assets together, but I've found that it's having problems with buttons that have bitmap effects applied.  I've attached a zip containing a single button fla and swf, along with the output of the -V use of swfmill.  The button has a drop shadow on the up state and a drop shadow and glow on the over state, and no filter on the down state.  Is there anything else I can do to help get support for these types of assets?

Here's the debugging output as well, in case the zip doesn't make it to the list.

Thanks.

--Brian

PARSE Header <at> 0-0 :821
PARSE Rectangle <at> 0-0 :821
PARSE bits: 15
PARSE left: 0
PARSE right: 11000
PARSE top: 0
PARSE bottom: 8000
PARSE framerate: 12
PARSE frames: 1
PARSE list<Tag> tags <at> 13-0 :821
PARSE FileAttributes <at> 15-0 :19
PARSE reserved1: 0
PARSE hasMetaData: 0
PARSE reserved2: 0
PARSE useNetwork: 0
PARSE reserved3: 0
PARSE SetBackgroundColor <at> 21-0 :24
PARSE Color <at> 21-0 :24
PARSE red: 255
PARSE green: 255
PARSE blue: 255
PARSE IF ctx->alpha - FALSE
PARSE DefineShape <at> 30-0 :125
PARSE objectID: 1
PARSE Rectangle <at> 32-0 :125
PARSE bits: 11
PARSE left: -920
PARSE right: 921
PARSE top: -605
PARSE bottom: 0
PARSE StyleList <at> 39-0 :125
PARSE n_fillStyles: 1
PARSE list<Style> fillStyles: 1 items, <at> 40-0 :125
PARSE LinearGradient <at> 41-0 :125
PARSE Transform <at> 41-0 :125
PARSE scaled: 1
PARSE bitsScale: 1
PARSE scaleX: 0
PARSE scaleY: 0
PARSE skewed: 1
PARSE bitsSkew: 12
PARSE skewX: 0.0184479
PARSE skewY: -0.0184479
PARSE bitsTranslate: 10
PARSE transX: 1
PARSE transY: -303
PARSE count: 2
PARSE list<GradientItem> gradientColors: 2 items, <at> 50-0 :125
PARSE GradientItem <at> 50-0 :125
PARSE position: 0
PARSE Color <at> 51-0 :125
PARSE red: 255
PARSE green: 255
PARSE blue: 255
PARSE IF ctx->alpha - FALSE
PARSE GradientItem <at> 54-0 :125
PARSE position: 255
PARSE Color <at> 55-0 :125
PARSE red: 191
PARSE green: 191
PARSE blue: 191
PARSE IF ctx->alpha - FALSE
PARSE n_lineStyles: 0
PARSE list<LineStyle> lineStyles: 0 items, <at> 59-0 :125
PARSE fillBits: 1
PARSE lineBits: 0
PARSE Shape <at> 60-0 :125
PARSE list<ShapeItem> edges <at> 60-0 :125
PARSE ShapeSetup <at> 61-7 :125
PARSE hasNewStyles: 0
PARSE hasLineStyle: 0
PARSE hasFillStyle1: 0
PARSE hasFillStyle0: 1
PARSE hasMoveTo: 1
PARSE xybits: 11
PARSE x: 921
PARSE y: -455
PARSE fillStyle0: 1
PARSE LineTo <at> 65: 5bits 0/-45
PARSE CurveTo <at> 67-5 :125
PARSE bits: 5
PARSE x1: -1
PARSE y1: -45
PARSE x2: -30
PARSE y2: -29
PARSE CurveTo <at> 71-3 :125
PARSE bits: 5
PARSE x1: -30
PARSE y1: -30
PARSE x2: -44
PARSE y2: -1
PARSE LineTo <at> 75: 7bits -135/0
PARSE LineTo <at> 77: 10bits -1382/0
PARSE LineTo <at> 80: 6bits -114/0
PARSE CurveTo <at> 82-4 :125
PARSE bits: 5
PARSE x1: -45
PARSE y1: 1
PARSE x2: -29
PARSE y2: 30
PARSE CurveTo <at> 86-2 :125
PARSE bits: 5
PARSE x1: -30
PARSE y1: 29
PARSE x2: -1
PARSE y2: 45
PARSE LineTo <at> 90: 5bits 0/45
PARSE LineTo <at> 92: 8bits 0/305
PARSE LineTo <at> 95: 5bits 0/45
PARSE CurveTo <at> 96-0 :125
PARSE bits: 5
PARSE x1: 1
PARSE y1: 44
PARSE x2: 30
PARSE y2: 30
PARSE CurveTo <at> 101-6 :125
PARSE bits: 5
PARSE x1: 30
PARSE y1: 30
PARSE x2: 44
PARSE y2: 1
PARSE LineTo <at> 105: 6bits 114/0
PARSE LineTo <at> 107: 10bits 1382/0
PARSE LineTo <at> 109: 7bits 135/0
PARSE CurveTo <at> 112-7 :125
PARSE bits: 5
PARSE x1: 45
PARSE y1: -1
PARSE x2: 29
PARSE y2: -30
PARSE CurveTo <at> 116-5 :125
PARSE bits: 5
PARSE x1: 30
PARSE y1: -30
PARSE x2: 1
PARSE y2: -44
PARSE LineTo <at> 120: 5bits 0/-45
PARSE LineTo <at> 122: 8bits 0/-305
PARSE ShapeSetup <at> 124-3 :125
PARSE hasNewStyles: 0
PARSE hasLineStyle: 0
PARSE hasFillStyle1: 0
PARSE hasFillStyle0: 0
PARSE hasMoveTo: 0
PARSE DefineSprite <at> 131-0 :147
PARSE objectID: 2
PARSE frames: 1
PARSE list<Tag> tags <at> 135-0 :147
PARSE PlaceObject2 <at> 137-0 :143
PARSE hasEventHandler: 0
PARSE hasClipDepth: 0
PARSE hasName: 0
PARSE hasMorph: 0
PARSE hasColorTransform: 0
PARSE hasTransform: 1
PARSE hasID: 1
PARSE replace: 0
PARSE depth: 1
PARSE objectID: 1
PARSE Transform <at> 142-0 :143
PARSE scaled: 0
PARSE skewed: 0
PARSE bitsTranslate: 0
PARSE transX: 0
PARSE transY: 0
PARSE ShowFrame <at> 145-0 :145
PARSE End <at> 147-0 :147
PARSE DefineScalingGrid <at> 149-0 :158
PARSE objectID: 2
PARSE Rectangle <at> 151-0 :158
PARSE bits: 11
PARSE left: -700
PARSE right: 680
PARSE top: -454
PARSE bottom: -151
PARSE DefineFont3 <at> 164-0 :489
PARSE objectID: 3
PARSE DefineFontInfo3 <at> 495-0 :538
PARSE objectID: 3
PARSE DefineText <at> 544-0 :579
PARSE objectID: 4
PARSE Rectangle <at> 546-0 :579
PARSE bits: 11
PARSE left: 45
PARSE right: 971
PARSE top: 54
PARSE bottom: 286
PARSE Transform <at> 553-0 :579
PARSE scaled: 0
PARSE skewed: 0
PARSE bitsTranslate: 6
PARSE transX: 26
PARSE transY: 0
PARSE glyphBits: 2
PARSE advanceBits: 9
PARSE list<TextRecord> records <at> 558-0 :579
PARSE TextRecord <at> 558-0 :579
PARSE IF ctx->tagVersion < 2 - TRUE
PARSE list<TextRecord6> records <at> 558-0 :579
PARSE TextRecord6 <at> 558-0 :579
PARSE isSetup: 1
PARSE reserved: 0
PARSE hasFont: 1
PARSE hasColor: 1
PARSE hasMoveX: 1
PARSE hasMoveY: 0
PARSE objectID: 3
PARSE Color <at> 561-0 :579
PARSE red: 51
PARSE green: 51
PARSE blue: 51
PARSE IF ctx->alpha - FALSE
PARSE x: 260
PARSE fontHeight: 280
PARSE TextRecord6 <at> 568-0 :579
PARSE isSetup: 0
PARSE nGlyphs: 6
PARSE list<TextEntry> glyphs: 6 items, <at> 569-0 :579
PARSE TextEntry <at> 569-0 :579
PARSE glyph: 1
PARSE advance: 120
PARSE TextEntry <at> 571-5 :579
PARSE glyph: 0
PARSE advance: 161
PARSE TextEntry <at> 572-2 :579
PARSE glyph: 3
PARSE advance: 148
PARSE TextEntry <at> 574-7 :579
PARSE glyph: 0
PARSE advance: 161
PARSE TextEntry <at> 575-4 :579
PARSE glyph: 1
PARSE advance: 120
PARSE TextEntry <at> 576-1 :579
PARSE glyph: 2
PARSE advance: 111
PARSE TextRecord6 <at> 578-0 :579
PARSE isSetup: 0
PARSE nGlyphs: 0
PARSE list<TextEntry> glyphs: 0 items, <at> 579-0 :579
PARSE IF ctx->tagVersion >= 2 - FALSE
PARSE DefineText <at> 585-0 :620
PARSE objectID: 5
PARSE Rectangle <at> 587-0 :620
PARSE bits: 11
PARSE left: 45
PARSE right: 971
PARSE top: 54
PARSE bottom: 286
PARSE Transform <at> 594-0 :620
PARSE scaled: 0
PARSE skewed: 0
PARSE bitsTranslate: 6
PARSE transX: 26
PARSE transY: 0
PARSE glyphBits: 2
PARSE advanceBits: 9
PARSE list<TextRecord> records <at> 599-0 :620
PARSE TextRecord <at> 599-0 :620
PARSE IF ctx->tagVersion < 2 - TRUE
PARSE list<TextRecord6> records <at> 599-0 :620
PARSE TextRecord6 <at> 599-0 :620
PARSE isSetup: 1
PARSE reserved: 0
PARSE hasFont: 1
PARSE hasColor: 1
PARSE hasMoveX: 1
PARSE hasMoveY: 0
PARSE objectID: 3
PARSE Color <at> 602-0 :620
PARSE red: 204
PARSE green: 0
PARSE blue: 0
PARSE IF ctx->alpha - FALSE
PARSE x: 260
PARSE fontHeight: 280
PARSE TextRecord6 <at> 609-0 :620
PARSE isSetup: 0
PARSE nGlyphs: 6
PARSE list<TextEntry> glyphs: 6 items, <at> 610-0 :620
PARSE TextEntry <at> 610-0 :620
PARSE glyph: 1
PARSE advance: 120
PARSE TextEntry <at> 612-5 :620
PARSE glyph: 0
PARSE advance: 161
PARSE TextEntry <at> 613-2 :620
PARSE glyph: 3
PARSE advance: 148
PARSE TextEntry <at> 615-7 :620
PARSE glyph: 0
PARSE advance: 161
PARSE TextEntry <at> 616-4 :620
PARSE glyph: 1
PARSE advance: 120
PARSE TextEntry <at> 617-1 :620
PARSE glyph: 2
PARSE advance: 111
PARSE TextRecord6 <at> 619-0 :620
PARSE isSetup: 0
PARSE nGlyphs: 0
PARSE list<TextEntry> glyphs: 0 items, <at> 620-0 :620
PARSE IF ctx->tagVersion >= 2 - FALSE
PARSE DefineButton2 <at> 626-0 :805
PARSE objectID: 6
PARSE reserved: 0
PARSE menu: 0
PARSE buttonsSize: 0
PARSE list<Button> buttons <at> 631-0 :805
PARSE Button <at> 631-0 :805
PARSE reserved: 1
PARSE hitTest: 0
PARSE down: 0
PARSE over: 0
PARSE up: 1
PARSE IF hitTest || down || over || up - TRUE
PARSE objectID: 2
PARSE depth: 1
PARSE Transform <at> 636-0 :805
PARSE scaled: 1
PARSE bitsScale: 17
PARSE scaleX: 0.869568
PARSE scaleY: 0.826447
PARSE skewed: 0
PARSE bitsTranslate: 11
PARSE transX: 800
PARSE transY: 500
PARSE IF ctx->tagVersion >= 2 - TRUE
PARSE ColorTransform2 <at> 645-0 :805
PARSE hasOffset: 0
PARSE hasFactor: 0
PARSE bits: 1
PARSE Button <at> 646-0 :805
PARSE reserved: 0
PARSE hitTest: 0
PARSE down: 0
PARSE over: 0
PARSE up: 1
PARSE IF hitTest || down || over || up - TRUE
PARSE objectID: 0
PARSE depth: 0
PARSE Transform <at> 651-0 :805
PARSE scaled: 1
PARSE bitsScale: 31
PARSE scaleX: -8192
PARSE scaleY: 0.0012207
PARSE skewed: 0
PARSE bitsTranslate: 0
PARSE transX: 0
PARSE transY: 0
buf is nonzero in byteAlign() <at> 661
PARSE IF ctx->tagVersion >= 2 - TRUE
PARSE ColorTransform2 <at> 661-0 :805
PARSE hasOffset: 1
PARSE hasFactor: 1
PARSE bits: 2
PARSE factorRed: 1
PARSE factorGreen: 0
PARSE factorBlue: 0
PARSE factorAlpha: 0
PARSE offsetRed: 0
PARSE offsetGreen: 0
PARSE offsetBlue: 0
PARSE offsetAlpha: 0
PARSE Button <at> 664-0 :805
PARSE reserved: 0
PARSE hitTest: 0
PARSE down: 0
PARSE over: 0
PARSE up: 0
PARSE IF hitTest || down || over || up - FALSE
PARSE list<Condition> conditions <at> 665-0 :805
PARSE Condition <at> 665-0 :805
PARSE next: 1280
PARSE menuEnter: 0
PARSE pointerReleaseOutside: 0
PARSE pointerDragEnter: 0
PARSE pointerDragLeave: 0
PARSE pointerReleaseInside: 0
PARSE pointerPush: 0
PARSE pointerLeave: 0
PARSE pointerEnter: 0
PARSE key: 51
PARSE menuLeave: 0
PARSE list<Action> actions <at> 669-0 :805
PARSE ConcatenateString <at> 671-0 :671
PARSE UnknownAction <at> 672-0 :672
PARSE NextFrame <at> 673-0 :673
PARSE UnknownAction <at> 675-0 :675
PARSE StringLength <at> 677-0 :677
PARSE UnknownAction <at> 680-0 :17075
WARNING: end of tag DefineButton2 is <at> 822, should be <at> 805
PARSE PlaceObject2 <at> 807-0 :817
PARSE hasEventHandler: 0
PARSE hasClipDepth: 0
PARSE hasName: 0
PARSE hasMorph: 0
PARSE hasColorTransform: 0
PARSE hasTransform: 1
PARSE hasID: 1
PARSE replace: 0
PARSE depth: 1
PARSE objectID: 6
PARSE Transform <at> 812-0 :817
PARSE scaled: 0
PARSE skewed: 0
PARSE bitsTranslate: 14
PARSE transX: 4699
PARSE transY: 3750
PARSE ShowFrame <at> 819-0 :819
PARSE End <at> 821-0 :821

Attachment (Button.zip): application/zip, 8 KiB
_______________________________________________
swfmill mailing list
swfmill@...
http://osflash.org/mailman/listinfo/swfmill_osflash.org
Ralf Fuest | 10 Apr 2007 22:31
Picon
Picon

Re: Bitmap filter effects on buttons

Hello Brian,
the current swfmill version doesn't support filters and blend modes for
buttons. I've written a patch to add support for this features.
Converting your sample swf to xml and back again worked.

When you want to compile it yourself you'll need an SVN version of the
source code, to get the codegen directory.

Ralf
Attachment (source.xml.patch): text/x-patch, 1090 bytes
_______________________________________________
swfmill mailing list
swfmill@...
http://osflash.org/mailman/listinfo/swfmill_osflash.org
daniel fischer | 10 Apr 2007 23:28

Re: Bitmap filter effects on buttons

Ralf Fuest <ralf-fuest@...> (on Tue, 10 Apr 2007 22:31:27 +0200):

  > the current swfmill version doesn't support filters and blend modes for
  > buttons. I've written a patch to add support for this features.

great, thanks! it's in 0.2.12.4.

got any more of these up your sleeve?

-dan

--

-- 
http://0xDF.com/
http://iterative.org/
Brian Williams | 11 Apr 2007 03:55
Picon

Re: Bitmap filter effects on buttons

Thanks!  I tried out 0.2.12.4 and it works for many of my buttons, but I found one which it doesn't like.  I've attached a sample swf and fla, and the output from the parsing.  The difference is that this button has an adjust color filter on it. 

I can probably work around this, but I thought I'd send it along.  Maybe it's another quick fix.

Thanks again.

--Brian


On 4/10/07, daniel fischer <dan-n52v3Af5Srg@public.gmane.org> wrote:
Ralf Fuest < ralf-fuest-Mmb7MZpHnFY@public.gmane.org> (on Tue, 10 Apr 2007 22:31:27 +0200):

  > the current swfmill version doesn't support filters and blend modes for
  > buttons. I've written a patch to add support for this features.

great, thanks! it's in 0.2.12.4.

got any more of these up your sleeve?

-dan


--
http://0xDF.com/
http://iterative.org/

_______________________________________________
swfmill mailing list
swfmill-AOfRjkeVuXpAfugRpC6u6w@public.gmane.org
http://osflash.org/mailman/listinfo/swfmill_osflash.org

Attachment (buttontest.zip): application/zip, 8 KiB
_______________________________________________
swfmill mailing list
swfmill@...
http://osflash.org/mailman/listinfo/swfmill_osflash.org
Ralf Fuest | 12 Apr 2007 02:58
Picon
Picon

Re: Bitmap filter effects on buttons

Hello,
there was an error in the parsing code for color filters, it should work
after the attached patch is applied. And your decision to send in the
file is right, because nobody can fix a bug that isn't known.

More technical stuff:
The end-condition for reading the ColorMatrix was wrong, so 21 instead
of 20 floats were read and that screwed up everything after the matrix.
I decided to add a size attribute to the list tag to make the source.xml
file look less confusing. size==19 for an list with 20 elements doesn't
look right ;). The Convolution filter also uses such a matrix and had a
similar end-condition, so i changed this attribute to an size attribute.
I couldn't check if this works because i don't have flash or an swf file
that contains this filter, but i think so.

Ralf

> Thanks!  I tried out 0.2.12.4 and it works for many of my buttons, but
> I found one which it doesn't like.  I've attached a sample swf and
> fla, and the output from the parsing.  The difference is that this
> button has an adjust color filter on it.  
> 
> I can probably work around this, but I thought I'd send it along.
> Maybe it's another quick fix.
> 
> Thanks again.
> 
> --Brian
Attachment (filters.patch): text/x-patch, 1397 bytes
_______________________________________________
swfmill mailing list
swfmill@...
http://osflash.org/mailman/listinfo/swfmill_osflash.org

Gmane