logo_michael-thomas.jpg (3143 bytes)

Flash Examples

This web page has some examples of using Flash.

ex.zip - Download a zip file with all of the examples listed on this page.
Flash Calling JavaScript - Example of Flash calling JavaScript that will shake the browser window.  Uses the flash actionscript command:  getURL ("javascript:shake_xy(2)");
Show/Hide a Flash Layer - Example of controlling a layer (show/hide) containing flash content.
Flash & JavaScript.  
MyFlashJavaScript - Example of Flash Calling JavaScript and storing data, then retrieving that data.  Click here to download the files involved.  Works with Netscape and IE.  Uses FSCommand().
MyFlashJavaScript (From Flash HTML Publish)- This example is code that comes straight from Flash5's publish:  File, Publish Settings, HTML, Template = Flash w/ FSCommand.  Notice that Netscape does not work!!!  See the example above that works with Netscape and IE - notice the swliveconnect=true option to the <embed> tag.
Flash Calling JavaScript - Example of Flash calling JavaScript that will shake the browser window.  Uses the flash actionscript command:  getURL ("javascript:shake_xy(2)");  Only IE works (looks like Netscape may not support this call).
Not finished with these examples:
JavaScript start/stop a Flash object - I'd like to be able to start & stop a Flash .swf object from JavaScript.
JavaScript calling a Flash event - I'd like to be able to call a Flash event from JavaScript
Flash & XML Object
ex_xml_sendandload - Netscape only (Don't know why IE doesn't work).  Example of using the XML objects sendAndLoad() method.  
Warning:  Make sure the URL has: http://www.michael-thomas.com
This example will return an error from the server because I'm not posting to a CGI program.  Netscape shows the error, but IE 5.5 doesn't - don't know why.  This flash program has been tested to work with NS 4.x and IE 5.5 (Win 2000 and MAC 9.1) with a custom Java HTTP Socket Server.
Launch a Flash file from another domain.
Click here to load a web page from this domain that reads a Flash file from your local file system.  If using heavy video (large area, high quality) w/ Flash, you may want to look at a local delivery of the flash video.  This opens up many challenges but may be worth it if the instruction needs video.

Other Examples

Html to Flash - download examples of passing parameters from HTML to Flash when the HTML page loads.  Works with Windows IE & NS and MAC IE & NS.