Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

utility-classes to use Swfmill( via Ruby.

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 doc
Octocat-spinner-32 lib
Octocat-spinner-32 sample
Octocat-spinner-32 COPYING
Octocat-spinner-32 README
Octocat-spinner-32 Rakefile
Octocat-spinner-32 VERSION
Octocat-spinner-32 swfmill_ruby.gemspec

SwfmillRuby is a utility-classes to use Swfmill( via Ruby.
This library is assumed to use to fiddle with the SWF published as FlashLite 1.1 - most popular version among mobile phone in Japan.

* features
  * SwfmillRuby::Swfmill
    * calling swfmill-program(xml2swf, swf2xml) from ruby.
  * SwfmillRuby::Swf
    * accessing to images(Magick::Image) included in Swf. (Swf#images)
    * replacing images and texts included in Swf.
      * supported tags: DefineBitsLossless, DefineBitsLossless2, DefineBitsJPEG2 and DefineEditText.
      * converting DefineBitsLossless, DefineBitsLossless2, DefineBitsJPEG2 <=> Magick::Image
    * controlling movieclips in Swf (alpha version)
      * accessing to movieclips as SwfmillRuby::DefineSprite in Swf. (Swf#movieclips)
      * accessing to movieclips by instance-name placed on stage. (Swf#movieclip_ids_named)
      * replacing movieclips with referred shapes, images and texts.
      * making partial xml meaning movieclip from Swf to use for replacing by DefineSprite#[]=. (DefineSprite#partialize)
      * making template text based on original xml to use for replacing by String#gsub. (DefineSprite#templatize)
      * adjusting referred object_ids on replace movieclips.
    * writing out re-generated Swf. (Swf#write)


 * swfmill 0.2.12 or greater
   - patched supporting CP932 encoding .. patched it on rev.278 (version
   - patched supporting DefineBitsLossless format=3
 * ImageMagick 6.3.7 or greater
 * rubygems and rmagick(2.8.0 or greater) library
 * LibXML2 and libxml-ruby(0.9.7)


First, Set constant SWFMILL in lib/swfmill.rb to path to swfmill-program for your environment.

 $ gem install jeweler
 $ rake build
 $ rake install

See sample/*.rb files for sample.


* Great patch-program for swfmill provided by KLab,Inc.
* Sample GIF image is provided by ICHIGO-APORO.
* Supporting 32-bit PNG by hokaccha-san.
* Supporting DefineBitsLossless by muraoka17-san.

Copyright (c) 2008-2010 tmtysk.
    released under the GNU GENERAL PUBLIC LICENSE Version 2.
    See COPYING for details.
Something went wrong with that request. Please try again.