public
Description: Create valid XHTML flash embed code in ruby.
Homepage: http://validifier.com
Clone URL: git://github.com/done21/validifier.git
name age message
file .gitignore Wed Jan 07 20:29:23 -0800 2009 Initial Commit [jimrhoskins]
file LICENSE Sun Jan 18 19:46:33 -0800 2009 Added License and rebuilt gemspec * Included M... [jimrhoskins]
file README.rdoc Sun Jan 18 20:52:18 -0800 2009 Fixed FlashMovie::validifiy bug * validify was... [jimrhoskins]
file Rakefile Thu Jan 29 19:23:53 -0800 2009 Fixed CLASSID and CODEBASE constants [jimrhoskins]
file init.rb Wed Jan 07 20:29:23 -0800 2009 Initial Commit [jimrhoskins]
directory lib/ Thu Jan 29 19:23:53 -0800 2009 Fixed CLASSID and CODEBASE constants [jimrhoskins]
file validifier.gemspec Wed Jan 28 21:27:41 -0800 2009 Updated classid and codebase missing constant b... [jimrhoskins]
README.rdoc

Validifier

Validifier allows you to generate valid XHTML flash embed code in ruby.

Usage

You can create a flash movie by supplying it with the data manually, or by supplying it with existing embed code.

Creating a flash movie manually

To create a new flash movie manually, just supply the path or url to your swf file and your options

        movie = Validifier::FlashMovie.new("http://example.com/index.swf", {:width => 640, :height => 480})

        movie.to_s # => The embed code for your movie

Creating a flash movie from existing embed source code

Validifier can also construct a flash movie from existing (x)html source code. You can access and update any of the properties of the movie

        movie = Validifier::FlashMovie.from_source(existing_source_code_string)

        # Update any properties of the movie
        movie.width = 640
        movie.height = 480
        movie.params["allowScriptAccess"] = "false"

        movie.to_s # => The embed code for your movie

If you only need to validify existing source code without modifying any propeties, you can use the validify method

        Validifier::FlashMovie.validifiy(existing_source_code_string) # => valid embed code string

Installation

Add github as a gem source (once per machine)

        gem sources -a http://gems.github.com

Install the gem

        gem install done21-validifier