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 9, 2009, 7:27 am, by Daniel, under
actionscript.
I’ve just updated UK Postcode Mapper Firefox plug-in to support Firefox version 3.5.* Once you’ve added the button to your toolbar, you can see any UK post code on a map in only two clicks.
Posted on March 31, 2009, 4:24 am, by Daniel, under
actionscript.
My first Firefox Extension UK Postcode Mapper has had over 100 downloads now but only one review. It will not leave the ‘experimental’ sandbox until it has more than 4 reviews. If anyone could please download it and review it (there really isn’t that much to it), it would be appreciated!
Posted on January 18, 2009, 2:08 pm, by Daniel, under
actionscript.
Download the UK Postcode Mapper Firefox extension here: UK Postcode Mapper This is my first Firefox Extension. It searches the current page you are browsing for any UK Postcode. It then shows you a list of all postcodes on a small popup window. Then you just click on the postcode you would like to see [...]
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( [...]
Posted on October 14, 2008, 9:00 am, by Daniel, under
actionscript.
Here’s a very handy javascript function to grab FlashVars from the URL. ‘GUP’ Get URL Parameters can sit in your html or in an external js file. function gup(name){ name = name.replace(/[\[]/,”\\\[").replace(/[\]]/,”\\\]”); var regexS = “[\\?&]“+name+”=([^]*)”; var regex = new RegExp( regexS ); var results = regex.exec( window.location.href ); if( results == null ) return [...]
Posted on June 20, 2008, 1:30 pm, by Daniel, under
actionscript.
Recently I read that the best way to open pop-up windows from Flash was to use the ExternalInterface class. I found some code that looked good but it didn’t work in Safari on a Mac. if (ExternalInterface.available) { ExternalInterface.call(“window.open”, “popup.html”, “win”, “height=300, width=400, toolbar=no, scrollbars=yes”); } else { getURL(‘popup.html’, ‘_blank’); } However it isn’t that [...]
Posted on February 18, 2008, 8:24 pm, by Daniel, under
actionscript.
After almost freaking out about a problem with FlashVars and a URL string variable that contained many ampersands (&) I couldn’t work out how to pass the URL in without Flash splitting the string up into separate variables until I came across this lovely JS function encodeURIComponent(…) This is a good one to remember