[swfmill] Bug in swfmill's svg import

Balázs Andorkó balazs.andorko at gmail.com
Fri Nov 3 05:25:54 EST 2006


Hi!

I think I found a bug?? in swfmill's svg import.
I made two svg with Inkscape: a red rectangle (rectangle1.svg) and a blue
rectangle(rectangle2.svg).
I tried to import them to an swf with swfmill and place them on the screen.
(bugExample.xml)

<?xml version="1.0" encoding="utf-8"?>
<movie version="7" width="300" height="300" framerate="21">
  <background color="#FFFFFF" />
  <frame>
    <library>
      <clip id="svg1" import="rectangle1.svg"/>    <!-- The red rectangle
-->
      <clip id="svg2" import="rectangle2.svg"/>    <!-- The Blue rectangel
-->
    </library>
    <place id="svg1" x="0" y="0" depth="1"/>    <!-- Red rectangle on the
screen -->
    <place id="svg2" x="100" y="0" depth="2"/> <!-- it should be blue but it
will be red too-->
  </frame>
</movie>

There should be a red and a blue rectangle on the screen, but there is two
red rectangle.
When i change the order of the import (rectangle2 first), then there is two
blue rectangle.

I used the swf2xml function on the generated swf (bugExamleDecompiled.xml)
and i found that swfmill assigned the objectID="2" twice


...
      <DefineSprite objectID="2" frames="1">
        <tags>
          <PlaceObject2 replace="0" depth="2" objectID="3" name="rect1880">
            <transform>
              <Transform transX="0" transY="0"/>
            </transform>
          </PlaceObject2>
          <ShowFrame/>
          <End/>
        </tags>
      </DefineSprite>
      <Export>
        <symbols>
          <Symbol objectID="2" name="layer1"/>
        </symbols>
      </Export>
...
      <DefineSprite objectID="2" frames="1">
        <tags>
          <PlaceObject2 replace="0" depth="5" objectID="6" name="rect4574">
            <transform>
              <Transform transX="0" transY="0"/>
            </transform>
          </PlaceObject2>
          <ShowFrame/>
          <End/>
        </tags>
      </DefineSprite>
      <Export>
        <symbols>
          <Symbol objectID="2" name="layer1"/>
        </symbols>
      </Export>
...

I changed the rectangle2.svg (rectangle2Changed.svg)(actually the layer id
to layer2) and the generated swf is fine. There is a red and a blue
rectangle.

I think there is a bug?? in the objectID assignment of the layers. I think
it couldn't be expected to have different layer ids in every svg.

The sources can be found at http://www.freeweb.hu/abalage/bugexample.zip

I used swfmill version 0.2.11.19

PS: sorry for my english

THX.
Balazs Andorko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/swfmill_osflash.org/attachments/20061103/61cb613e/attachment.htm


More information about the swfmill mailing list