[swfmill] xml2swf (advanced mode)

Ralf Fuest ralf-fuest at gmx.de
Fri Apr 13 14:17:00 EDT 2007


It is possible to do rotation in simple mode using the skew parameters,
as Mark said, but you need an current version of swfmill. I've attached
a example of colored rotated text in simple (test.xml). When you need a
textfield with different colors in it you can use HTML markup inside the
text attribute (test_html.xml).

I've also written a patch to add a rotation attribute to the place tag
that makes rotating objects easier. The angle is in degrees, because i
think it is easier to use. test_rotation.xml is the same as test.xml,
but it uses the rotation attribute and only works after the patch is
applied.

Ralf

> On 4/13/07, Christian Giordano <ml at nuthinking.com> wrote:
> > Hi guys, I would need to generate a swf with embedded an image and
> > rotated/colored texts. I presume the latter is not possible to do in
> > simple mode (I read about the rotation patch but I would need also to
> > set some text formatting, and I never compiled swfmill).
> > Where could I then find some instructions to learn the xml api to
> > obtain what I would need?
> 
> I think this actually is possible in simple. There's <transform/> with
> attributes scalex, scaley, skewx and skewy. If I'm not mistaken, this
> is a normal 2D transformation matrix.
> 
> As a 2D matrix, a rotation would be:
> 
> cos(a) -sin(a)
> sin(a) cos(a)
> 
> where 'a' is the angle in radians. The two cos' are scalex and scaley,
> I suspect the other two are skew. Maybe try it and see if it works.
> 
> You can find <transform/> in the xslt that transforms swfml-s to swfml-l here:
> <http://swfmill.org/trac/browser/trunk/src/xslt/simple-elements.xslt>
> 
> If that doesn't work, the easiest way to get the proper swfml-l is to
> find (or create) an example of what you want to do and convert it with
> swf2xml to see how it works.
> 
> HTH,
> Mark
> 
> _______________________________________________
> swfmill mailing list
> swfmill at osflash.org
> http://osflash.org/mailman/listinfo/swfmill_osflash.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.xml
Type: application/xml
Size: 741 bytes
Desc: not available
Url : http://osflash.org/pipermail/swfmill_osflash.org/attachments/20070413/15c2b08a/test.rdf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_html.xml
Type: application/xml
Size: 492 bytes
Desc: not available
Url : http://osflash.org/pipermail/swfmill_osflash.org/attachments/20070413/15c2b08a/test_html.rdf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_rotation.xml
Type: application/xml
Size: 652 bytes
Desc: not available
Url : http://osflash.org/pipermail/swfmill_osflash.org/attachments/20070413/15c2b08a/test_rotation.rdf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rotation.patch
Type: text/x-patch
Size: 1913 bytes
Desc: not available
Url : http://osflash.org/pipermail/swfmill_osflash.org/attachments/20070413/15c2b08a/rotation.bin


More information about the swfmill mailing list