SNIP:
var imageLoader:Loader;
function loadImage(url:String):void {
// Set properties on my Loader object
imageLoader = new Loader();
imageLoader.load(new URLRequest(url));
imageLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, imageLoading);
imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);
}
loadImage(“http://www.domain.nl/piwik/piwik.php?idsite=1&url=http%3A%2F%2Fwww.domain.nl%2Fsubfolder%2F&urlref=http%3A%2F%2Fwww.domain.nl%2Fsomeotherreferralsubfolder&dir=0”);
function imageLoaded(e:Event):void {
// Load Image
statsimg.addChild(imageLoader);
}
function imageLoading(e:ProgressEvent):void {
// Use it to get current download progress
// Hint: You could tie the values to a preloader 🙂
}
Use this to track embedding / opening of your flash files.