LogoLogo
  • Home
  • Projects
  • About
  • Contact

Website Generation Tool Take II

Devon O. · December 29, 2008 · AIR, Flash · 53 comments
4

Many moons ago I posted an AIR tool that would allow a user to drag a .swf file into a target area and have it spit out all the javascript, html, etc into a designated output directory. I’m not sure if anyone other than I ever used the thing, but I actually use it constantly at work and it seemed high time for a little update.

Well version 2 is here, and while it has the same bad name (“OBO Site GatherAIR”), it’s much more user friendly. This version now features template html files that can be selected. It ships with three templates (“Basic”, “Fullscreen with SWFFIT” and “Flash Centered in HTML” – personally, I don’t care much for the last as it relies on a table to do the centering. All are standards compliant though). Creating your own templates is a piece of cake. Just create a .html file that you’d like to use as a template and give it a memorable name (the name of the file is what will appear in the templates drop down box). Use the following abbreviatations inside the .html file (check out the included templates for examples of how to use the abbreviations):

C#
1
2
3
4
5
6
7
8
9
10
11
12
$DESC        - description of website
$KEY        - website keywords
$AUTH         - website author
$TITLE         - title of html page
$WIDTH         - width of swf file
$HEIGHT     - height of swf file
$BG         - background color (6 digit hex number)
$MENU         - true or false (whether or not to show the Flash context menu)
$FULLSCREEN    - true or false (whether or not to allow full screen)
$SWF         - name of .swf file
$DIV         - name of div that will house the .swf file
$VERSION     - version of .swf file

Finally, just save the html file inside the “templates” directory that is inside the application’s installation directory. The next time you run the app, your template will be selectable from the drop down menu.

The application comes packaged with swfobject.js v 2.1, swfaddress.js v 2.2, and swffit.js v 2.0 (please, no one sue me). To update to newer versions as they appear, just plunk the newer versions into the “includes” directory inside the installation directory (make sure they have the same name’s as the older versions and overwrite those obsolete ones).

*** UPDATE (30DEC08) ***

Yes, already an update to v 2.1. In the previous version (yesterday’s that is), I was moving the files using the File.copyTo() method. Worked fine, but lacked any feedback and, for large .swf files, you may end up sitting there awhile wondering if anything was actually happening. Now, I’ve switched to transferring the files with File.copyToAsync(). Long story short, once all files have been copied to the output directory, you will receive a nice little “Mission accomplished!” message to let you know everything is done.

A few gotchas to watch out for:

  • Selecting the “fullscreen with swffit” template does not automatically include the swffit.js file – make sure to check the checkbox to include it in the output.
  • When publishing to a full screen site, be sure to set up the .swf’s stage properties accordingly (i.e. set the align, set the scale to no scale, etc.).
  • Also, even though there is a checkbox to  include swfaddress.js, none of the html templates include the swfaddress.js script. You’ll either have to modify the final html file – or create your own template!
  • The width, height, and file version variables are taken directly from the .swf file. If you would like to change these or add a minor version to your html, you’ll have to do so manually.

Below is a screenshot:

If interested you can install the application using the badge below:

Get Adobe Flash player

Or you can download the .air file directly here.

Let me know if you find it useful, create your own templates, or have any ideas for further improvements.

  Facebook   Pinterest   Twitter   Google+
  • Logical Or Assignment Bug in ASC2
    August 25, 2013 · 6 comments
    6196
    21
    Read more
  • Essential AIR & FITC
    December 21, 2008 · 0 comments
    1548
    3
    Read more
  • Adventures in Playbook Land
    April 09, 2011 · 9 comments
    28678
    9
    Read more
53 Comments:
« Previous 1 2

Leave a Comment! Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Devon O. Wolfgang

AIR | Unity3D | AR/VR

Unity Certified Developer

Technical Reviewer of “The Essential Guide to Flash CS4 AIR Development” and “Starling Game Development Essentials”

Reviewer of “The Starling Handbook”

Unity Engineer at Touch Press.

Categories
  • Actionscript (95)
  • AIR (16)
  • Flash (99)
  • Games (7)
  • Liberty (13)
  • Life (53)
  • Shaders (20)
  • Unity3D (21)
Recent Comments
  • MainDepth on Unity Ripple or Shock Wave Effect
  • Devon O. on Unity Ripple or Shock Wave Effect
  • Feral_Pug on Unity Ripple or Shock Wave Effect
  • bavvireal on Unity3D Endless Runner Part I – Curved Worlds
  • Danielius Vargonas on Custom Post Processing with the LWRP
Archives
  • December 2020 (1)
  • December 2019 (1)
  • September 2019 (1)
  • February 2019 (2)
  • December 2018 (1)
  • July 2018 (1)
  • June 2018 (1)
  • May 2018 (2)
  • January 2018 (1)
  • December 2017 (2)
  • October 2017 (1)
  • September 2017 (2)
  • January 2017 (1)
  • July 2016 (1)
  • December 2015 (2)
  • March 2015 (1)
  • September 2014 (1)
  • January 2014 (1)
  • August 2013 (1)
  • July 2013 (1)
  • May 2013 (1)
  • March 2013 (2)
  • December 2012 (1)
  • November 2012 (1)
  • September 2012 (3)
  • June 2012 (2)
  • May 2012 (1)
  • April 2012 (1)
  • December 2011 (2)
  • October 2011 (3)
  • September 2011 (1)
  • August 2011 (1)
  • July 2011 (1)
  • May 2011 (2)
  • April 2011 (2)
  • March 2011 (1)
  • February 2011 (1)
  • January 2011 (2)
  • December 2010 (3)
  • October 2010 (5)
  • September 2010 (1)
  • July 2010 (2)
  • May 2010 (5)
  • April 2010 (2)
  • March 2010 (7)
  • February 2010 (5)
  • January 2010 (5)
  • December 2009 (3)
  • November 2009 (1)
  • October 2009 (5)
  • September 2009 (5)
  • August 2009 (1)
  • July 2009 (1)
  • June 2009 (2)
  • May 2009 (6)
  • April 2009 (4)
  • March 2009 (2)
  • February 2009 (4)
  • January 2009 (1)
  • December 2008 (5)
  • November 2008 (2)
  • September 2008 (1)
  • August 2008 (6)
  • July 2008 (6)
  • June 2008 (9)
  • May 2008 (4)
  • April 2008 (3)
  • March 2008 (4)
  • February 2008 (9)
  • January 2008 (7)
  • December 2007 (6)
Copyright © 2021 Devon O. Wolfgang