Posted on November 18, 2009, 2:56 am, by Daniel, under
actionscript.
The easiest way I have found to center a SWF both vertically and horizontally in HTML is using tables. <table width="100%" height="100%" border="0"> <tr> <td valign="middle" align="center"> … </td> </tr></table>
Posted on October 11, 2009, 5:31 am, by Daniel, under
actionscript.
Here is an excellent post about how to use an ‘onclick’ event to dynamically load a SWF. The great thing about this example is that the javascript will dynamically add or remove the required DIV tag needed to embed the SWF. link
Posted on September 29, 2009, 6:15 am, by Daniel, under
actionscript.
Some browsers put in padding around flash content that is scaled to fit 100% height and width. This is a quick CSS / HTML fix to make your full-screen flash movie fit the full height and width of the browser. Just put this in the top of your HTML inside your CSS declaration * {margin:0px;padding:0px;}
Posted on December 6, 2008, 12:03 pm, by Daniel, under
actionscript.
Getting values from the URL string in AS3 isn’t very complicated. First you need to set up your html to pass these into the SWF using a javascript function: <script language="javascript">function gup(name){ name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); var regexS = "[\\?&]"+name+"=([^&#]*)"; var regex = new RegExp( regexS ); var results = regex.exec( window.location.href ); if( results == [...]