Hey all. I've been asked by a sponsor to implement the following Sitelock code:
I had a go at understanding the regular expression myself, but apparently it wasn't correct. Would someone be so kind as to either recreate the above Actionscript in MMF2 events, or maybe even just copy-paste that into a new extension? If you did, you'd be scientifically proven to be pretty cool.
// returns true if the current swf is hosted on an MTVN domain, false otherwise
function testSiteLock ()
var siteLock:RegExp = /^(http|https):\/\/([-a-zA-Z0-9\.])+\.(shockwave|addictinggames|mtvi)\.com(\/|$)/;
return ( siteLock.test ( loaderInfo.url );