Putting Swiffy To The Test

Swiffy is the Google Labs SWF(Flash) to HTML5 converter. Despite winding down Google Labs, Swiffy development continues apace. On launch it supported most of Flash version 5, but the recent August 16th release (release notes) shows it now supports Actionscript introduced in Flash version 6.

I’ve been paying close attention to Swiffy as Question Writer publishes to Flash file format and uses V6 as a base. QW quizzes are a good test for how well Swiffy supports standalone Flash 6 content because they use a lot of the advanced actionscript capabilites, but everything is compiled into a single file and the quizzes don’t push Flash capabilities in a way that would be problematic for an HTML5 conversion.

Putting the Test to Swiffy

Here’s the quiz I’ve been testing as a benchmark for which features have been included so far. It’s our standard 10 question, “What do you know about Italy?” quiz.

Here’s

The Original Flash Quiz
(727k compressed)

After Conversion with Swiffy V3.2, in HTML5 (Use Chrome or Safari to view)
(495k compressed, 1.8MB uncompressed)

You’ll immediately notice the showstopper is the missing next button. This is because of a missing actionscript feature (Clip Actions, see below)

But notice also that it is handling the logo very well (a vector image), and the text uses the Flash ‘Embedded Font’ method – so each letter is being rendered as an individual vector by HTML5. The text actually appears more clearly on my monitor.

The Errors

Here’s the full list of warnings that that Swiffy comes up with. I’ve grouped them according to my estimate of how important they are for getting Question Writer quizzes to play properly.

Essential (Showstoppers)

  • SWF 6 (or later) clip actions are not supported. (123 occurrences)
  •  The ActionScript class XML is not supported. (8 occurrences)
  • The ActionScript method MovieClip.onRollOver() is not supported. (2 occurrences)
  • The ActionScript method MovieClip.onRollOut() is not supported. (2 occurrences)
  • The ActionScript method MovieClip.unloadMovie() is not supported. (1 occurrences)
  • The ActionScript method MovieClip.setMask() is not supported. (3 occurrences)

Workarounds (For these we could probably tweak calls in QW to use something Swiffy does support)

  • The ActionScript function updateAfterEvent is not supported. (1 occurrences)
  • The fscommand action is not supported. (2 occurrences)
  • The ActionScript class TextFormat is not supported. (1 occurrences)
  • The ActionScript property System.capabilities is not supported. (7 occurrences)
  • The ActionScript method MovieClip.getURL() is not supported. (2 occurrences)
  • The ActionScript method MovieClip.createEmptyMovieClip() is not supported. (1 occurrences)
  • The ActionScript method MovieClip.loadMovie() is not supported. (1 occurrences)

Accessibility (Not a priority for a SWF->HTML5 Conversion)

  • The global ActionScript property _accProps is not supported. (211 occurrences)
  • The ActionScript method Object.addProperty() is not supported. (9 occurrences)
  • Modifying the tab order is not supported. (42 occurrences)

Nice To Have

  • The ActionScript class Sound is not supported. (3 occurrences)
    (Used for sound on buttons)
  •  Input text is not supported. (1 occurrences)
    (Used for text entry style questions)
  •  Streaming audio is not supported. (2 occurrences)
    (Used for questions with sound content)

Probably Make Very Little Difference

  • Different stroke cap styles for start and end are not supported. (1 occurrences)
  • Filters are not supported by (Mobile) Safari. (1 occurrences)
  • Miter limit will behave differently, as it will revert to bevel instead of cutting off the joint. (19 occurrences)
  • Linear RGB color interpolation for gradients is not supported on certain platforms. (1 occurrences)
  • The ActionScript method MovieClip.createTextField() is not supported. (12 occurrences)
  • The ActionScript method MovieClip.moveTo() is not supported. (3 occurrences)
  • The ActionScript method MovieClip.curveTo() is not supported. (8 occurrences)
  • The ActionScript method MovieClip.lineTo() is not supported. (9 occurrences)
  • The ActionScript method MovieClip.endFill() is not supported. (3 occurrences)
  • The ActionScript method MovieClip.beginFill() is not supported. (3 occurrences)
  • The ActionScript method MovieClip.lineStyle() is not supported. (2 occurrences)

Don’t Know

  • An unsupported ActionScript instruction was encountered. (7 occurrences)
  • The ActionScript property arguments is not supported. (1 occurrences)

I think it’s reasonably close. Based on the progress so far, I’d estimate two months before Swiffy can convert the quiz into something functional.

Things I’m wondering about

Google hasn’t said much about Swiffy yet. I get the sense they haven’t decided exactly how to distribute it yet.

  1. I’m wondering if it will be possible to scale Swiffy output to run at 100%x100% of the browser window in the same way that Flash can?
  2. I’m wondering what language(s) are used for Swiffy.
  3. Most of all, I’m wondering how Swiffy is going to be licensed. I’m hoping that we’ll be able to distribute it with Question Writer so that users can publish to both formats, and use the Swiffy output as alternative content when Flash is not installed on the system.
This entry was posted in Technical Tips. Bookmark the permalink.

One Response to Putting Swiffy To The Test

  1. Pingback: Putting Swiffy To The Test | Flash Designers