swfmill simple doesn't put PlaceObject3 tags into DefineSprite tag when importing.

Bug #683793 reported by Mitch Walker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
swfmill
Fix Committed
Undecided
Unassigned

Bug Description

When importing a SWF in simple mode, swfmill places most of the objects into a DefineSprite tag, then places that on the main timeline with the requested name. However, it does not place any objects to which filters have been applied into this DefineSprite tag. Instead, these objects are placed in the root timeline of the resulting movieclip. This has the net result of making these objects "ignore" the playhead position of the imported movie clip, and also their instance names are in a different scope than their un-filtered bethren.

Closer inspection shows that objects with filters are placed with a relatively new PlaceObject3 tag; the same object without any filters is placed with a PlaceObject2 tag. However Adobe's own SWF format documentation does not list PlaceObject3 as an allowable control tag inside a DefineSprite tag. Therefore, this "shortcoming" in swfmill is not a true bug, because it's following spec: putting PlaceObject2 tags inside a DefineSprite tag, but leaving PlaceObject3 tags outside of it. However, the Flash IDE (at least v9/CS3) does put PlaceObject3 tags inside DefineSprite tags, despite the spec, and the resulting SWF plays properly. Because of this, I suspect that the SWF format documentation simply needs to be updated to include PlaceObject3 as an allowable tag. The current list of allowable tags may well have predated the advent of PlaceObject3.

Anyway, because of the structure of swfmill, the fix for this issue is trivial, and I suppose the only question might be whether or not to do this at all, since it deviates from the vendor's spec.

I've attached a patch for consideration. I have already applied it to my checkout, built it successfully, and found that it solves this problem without creating new ones (yet, anyway).

Revision history for this message
Mitch Walker (mitch-esolation) wrote :
Revision history for this message
Daniel Cassidy (djcsdy) wrote :

Apologies for taking so long to respond to this.

The next release of swfmill will include this change.

When Flash (Player) and the SWF spec disagree, I’m generally siding with Flash, and there are much more egregious instances of disagreement than this one. At least in this case it’s fairly obvious what <DefineSprite><PlaceObject3/></DefineSprite> ought to mean, even if it’s not strictly allowed by the spec. Since there’s no other way to support this functionality, and this way clearly works, we have no other choice.

Thanks for investigating the problem and for your submission.

I have moved swfmill development to GitHub so you can see the change there: https://github.com/djcsdy/swfmill

Changed in swfmill:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.