The Official Blog of Patcoola

Im just a dude watching over my parents,
and trying to make cartoons and video games from home.

Script: Embed SWF (JS)

Important!

Dear visitors,

This blog and the Tigarus.com network will be changing our website software in May (2024). There will be some down time and there will be a change to the webpage addresses.

We will also be removing the Anime blogs. The Rocksmith Songs website will be unavailable of a few weeks or months while I move the database to the new software.

At the moment we are running on Wordpress, the new software is an in-house project which is 57 times faster. It will also provide more freedom for development.

Thank you for understanding.

, By Patcoola

Script Title: Embed SWF
Programming Language: Java Script
Date Completed: 2011/12/24

Purpose: To quickly and easily add Flash content to a Web page.

Advertisement

Donate Now!

After a hard day, I like to relax with a cold jar of pickle juice and a hardy fart. If you like my blog, please consider donating.


Description: Embed SWF is an easy to insert Java Script with an API to configure parameters. Quickly and easily add Flash content to a Web page without dealing with a large code block of HTML. Easy to configure with our API variables. Includes a missing plugin message box to replace the missing content. Embed SWF can also make sharing Flash content such as videos and games easy for anyone to add to another Website.

Personal Thoughts: As a Flash developer/animator adding and managing Flash content was annoying to deal with in Web pages, this Java Script greatly simplifies the process. The missing plugin message makes knowing that the Flash content cannot be displayed clear and keeps the same content area intact so the Web pages design/content won’t be obstructed.

Method:

var mySWF = new swfObject(); // define a new object
mySWF.api.divID // default flashContent####
mySWF.api.divClass // default (empty)
mySWF.api.width // default value 550
mySWF.api.height // default value 400
mySWF.api.id // default flashContent####
mySWF.api.align // default middle
mySWF.api.paramMovie // default (empty) !important, your swf file here
mySWF.api.paramQuality // default high
mySWF.api.paramBGcolor // default #ffffff (white)
mySWF.api.paramPlay // default true
mySWF.api.paramLoop // default true
mySWF.api.paramWMode // default window
mySWF.api.paramScale // default showall
mySWF.api.paramMenu // default true
mySWF.api.paramDeviceFont // default false
mySWF.api.paramSAlign // default (empty)
mySWF.api.paramAllowScriptAccess // default sameDomain
mySWF.api.createSWF() // function to embed the Flash object on the Web page

Example Usage:

var flash1 = new swfObject();
flash1.api.divID = “flash1”;
flash1.api.width = 620;
flash1.api.height = 320;
flash1.api.paramMovie = “http://myDomain.com/swfbin/flashtitle.swf”;
flash1.api.createSWf();

 

Advertisement

Donate Now!

This might not be the best time, but making a blog is not easy. Would you consider donating?


 

Post Meta

Share Post

 

Comments: Write Comment

Be the first to write a comment.


Leave a Comment


All comments are reviewed before publishing. Comments must be related to the page topic, must not be spam, and must comply with the criminal code of Canada.

 
9.613871 milliseconds