Silverlight 2 Released

Silverlight 2 has been released. This is the real silverlight release.  The release last year 1.0 was just a javascript release and only had one object, the downloader, not even a text input.  But now there are real tools like rich ui controls, services support (REST), DLR (C#, Linq, ironpython/ruby) and Sockets which are much needed for games and game platform development.

There are also much better tools at this stage:

Bam. Silverlight 2 is out. There’s the expected stuff, like the final SDK, Expression, and Silverlight tools:

And from Tim’s blog:

But there’s also Yes, that means you can code Silverlight in Eclipse. Details and progress at the Eclipse Tools for Silverlight Blog. It’ll be licensed under the EPL 1.0 License.

I have done lots of Silverlight initially when 1.0 came out as well as the agency I was working at.  We did video players, mini-games, demo apps and even the Halo 3 online manual at  But it wasn’t really ready until now.  It still has a long way to go to really be an alternative to Flash but it is capable platform at version 2 for applications, mini-games and video apps for sure. But in the end it just provides competition to make both the Flash/Flex platforms and Silveright compete for developer support.

Hardware of the Casual Gamer

Making great games, applications and tools using flash, silverlight or other tools that are emerging such as Unity3D takes great style, effort and knowing your target. We need to know what the end-user machine has at hand.  The Unity 3d guys put together a great post on the capabilities of casual gaming machines. With all the talk about flash 3d, unity3d and silverlight what level are you targeting and what group of people can actually PLAY your games as you envision.

Pretty much everyone knows Valve’s hardware survey – it’s a very valuable resource that shows what hardware the typical “hardcore PC gamer” has (that is, gamers that play Valve’s games).

However, the “casual gamer”, which is what Unity games are mostly targeted at, probably has slightly different hardware. “Slightly” being a very relative term of course.

Lo and behold – we have a glimpse into that data.

How? First time the Unity Web Player is installed, it submits anonymous hardware details (details in the EULA). This happens only once, and contains no personally identifiable information. It’s much like visitor statistics trackers on the websites that gather your OS, browser information and whatnot.

Remember, all this data is from people who installed Unity Web Player (most likely because they wanted to play some Unity content on the web). Hardware of standalone game players might be different, and hardware of your game’s players might be different as well. The data set is well over a million samples at the moment.

Check out the full stats here.

The most interesting stats to me:

OS Platforms

Windows 96.8%

Mac OS X 3.2%

CPU Core count overall

1 54.7%

2 44.1%

4 1.1%

8 .1%

Wow this one is surprising, but with the type of gamer that will play and download a quality new plugin to get to a game, maybe not.  They need to have the latest and greatest.  Multi-core processors have been selling for about 2-3 years so this is a continuing trend that will make Flash 3d and even plugins like Unity 3d better over the short term.

Also when you check it over at Unity Blog note the top cards, it is a bit painful if you are a casual gamer developer.  Not a decent card in the top 10-15. But that is changing rapidly over the next 1-2 years in this regard. But this also vyes well for flash based games that rely on dual core software rendered results right now as a decent constraint for developers to keep content painfully accessible to all states of machinery out there.

I wonder if this information is available on the flash player and public? This is specific to the Unity 3D plugin that is also a bit of a different market that is willing to install a plugin for better experiences.  With Flash it is usually preinstalled or auto updated for a casual user and might be different as Flash has a 98% penetration rate.  Or for that matter the Director users which would be more gaming focused which amout ot about 40% of internet users.  But as with the case of Unity it is specific to games right now and a small penetration rate, Flash is also apps, ads, tools, demos, interactives in addition to games.  Having this information on Flash or Director would be nice.

Degrafa for Flex Looking Pretty Sweet (AS3 and Commonizing Paths Graphics Pipeline for Silverlight and Flex)

Just recently through the holidays Degrafa has made some great strides as a very cool SVG pathing and designers toolkit for Flex. I have to say some recent Flex apps have really looked good like Picnik and Buzzword but this kit looks to clean up the lack of design and default style-itis that has plagued most common Flex Apps.

This so far looking like a pretty strong kit for bringing the designer pipeline into Flex to provide some really nice looking web styled apps. It has a direct crossover to Silverlight and Path objects that are largely just a series of data created in Expression or exported from Illustrator into XAML. The one benefit of Flex/Flash is it compiles to a very small SWF where with Silverlight you have to package the XAML in a zip and use the downloader object to extract it out. These XAML files and Paths can get massive as I am sure the ones for Degrafa will for Flex but the compile option is nice as it is compressed heavily.

All about Degrafa

Yes the launch includes shiny buttons…

Sphere Sample (right click for source)

Also, it appears it is a way to bridge the pathing and pipeline for flash or Silverlight. At one of the contributors blogs they mention this:

We have lot of interesting features planned for the coming releases. There is also a converter app that will be made available for converting the juicy Degrafa graphics to XAML.

Degrafa has gone live.


AS3, AS2, Silverlight, Actionscript in Google Trends for Vector Wars

Here is an interesting look to start the new year at Google Trends for some common keywords to this blog audience. Comparing AS2, AS3, Silverlight and actionscript you can see that there is some pretty interesting things happening.

as3 as2 actionscript silverlight  

First off, AS2 and AS3 are clouded because they are also related to EDI and EDI-INT so they get a bit inflated. Silverlight though is pretty unique in the naming. So from this graph we can see this happening:

  • Silverlight and AS3 are growing rapidly
  • Silverlight is crossing over as3 or meeting it
  • The market looking for Silverlight is about 8-10 times as large as actionscript/as3/as3
  • Silverlight and AS3 are growing, AS2 has no growth left and is an EOL language (end of life)
  • AS2 (even with crossover to EDI trends for “as2”) leveled out, where AS3 is starting to lift to a larger market. This is strongly due to it being a fun language based on ES4 and interests programmers.
  • The as3 effect started right in March-April 2007 (hrm I started this blog in April 2007 coincidenc? j/k :))

Another chart including Flex shows a better picture of the keyword wars between flex and silverlight.

as3 as2 actionscript silverlight flex

So from this graph we can see this happening:

  • Flex has a large buzz
  • Adobe’s marketing efforts are many while silverlight is more unique and focused
  • Flex, as3 and Silverlight are popular, and growing in their support (the growth market for technology is in these areas, not in tech from Flash 8/as2)
  • AS2 still taking a nosedive

Flash and Flex programmers and designers should know that with Silverlight 2.0 release coming and the capabilities of Silverlight 2.0 more competitive, flashers should be working on Flex, Flash9 or at least AS3 if not Flex. The RIA competition market will heat up immensely this year with Silverlight 2.0 and possibly Flex3 and coding and programming for Flash and Flex is becoming more involved. It also has a very strong competitor in Silverlight 2.0 coming that will drive this market.

This is all great news if you are ready for it, if you are still coding actionscript2 (AS2) and paying no mind to Silverlight, Flex or at least actionscript3 (AS3) then you will see your market slowly start to fade as things are ramped up and more of a programming focus in the vector wars. If you are a flash coder and ignoring Silverlight, your solutions will suffer. If you are a silverlight coder or .NET coder and ignoring the Flex and AS3 rise your solutions will suffer. I have been playing in AS3, Flex and Silverlight for over a year on both now and they are an entirely new platform with great programming models. The competition puts focus on this market so it is a great time to be skilled in these areas.

MosesProposes: Standardizing Animation and Motion Kits for Flash, Flex, After Effects, Javascript and I add Director and haXe

The Proposal

Moses, the maker of FuseKit, is hoping to influence Adobe product lines to include a common base for animation and motion going forward. Currently the AS3 world is very alive and is inspiring developers like myself to build lots of toolkits and really creating reusable code and kits that can make things very easy from going to Flash to Flex. But wouldn’t it be nice if a part of these kits that have to be downloaded every time you have an application use them be part of the native Adobe applications, or a core animation kit that partially standardizes animation basics to build upon further?

Are we just asking for trouble or is this a good idea? I don’t’ think it can hurt to bring this to the surface. I know that common syntax and familiar kits can really help the developers and designers move from Flash to Flex to After Effects to Javascript, it could also help Adobe with usage and usefulness of their entire suite of products. Or further this could be a standard that allows Silverlight to also build upon (open standard) and may the best platform win.

I think it would be very wise for Adobe to:

  • Standardize animation toolkits across their products and
  • Start standardizing some of the basic tools of building motion and filter kits to native but still allowing a flourishing open source and community research and development aspect.

What MosesProposes:

Moses did speak with someone at Adobe about this and it is generally in the plans:

“It was also a pleasure to see Richard Galvan present the upcoming crop of Flash features: the sleek update to the animation timeline (better late than never?), support for columnated flowing text (double finally!) and the big one, native 3D player support for Display Objects as rotatable 2D planes. He ran out of time and didn’t get to a few others shown at Adobe MAX, such as built-in IK (inverse kinematics) and faster pixel-level drawing for texture-mapping and photoshop-like filter effects.

Talking to him after the presentation I learned that Richard has a keen awareness of exactly where each feature is at currently. We chatted about low-level animation mechanics of the Flash Player, and I found out that the holy grail of a time-based player is indeed on the distant horizon, but that each rev will need to be a small step toward this goal. The new Flash timeline features meld After Effects, Premiere and Live Motion, and from what I’ve seen I have to say that they are nailing this long-overdue upgrade with great design decisions and a level of usability we’ve never seen in Flash. Kudos, team!”

The Current Situation

Right now Tweener and TweenLite (and animation package and a few others) have a unique position in that they work the same almost for AS2 and AS3 (Flex or Flash – with minor property changes such as _x to x as that has changed in AS3). But it would be nice if these kits also had a version for After Effects (really bringing that tool into Flash/flex developer worlds) and Javascript and it would be great if Silverlight also were supported (AgTweener anyone?).

Tweener is leading the pack in this aspect of creating a similar experience from AS2 to AS3 in Flash and AS3 in Flex and even JSTweener for Javascript, and a kit for haXe which is becoming my favorite toy and the dark horse with the most upside potential, with haXe on the loose these points may all be moot as haXe can target any platform (except After Effects easily, correct me if I am wrong and Silverlight but it could easily be done so to do it for Silverlight 1.0 which is ES3 based).

I don’t use After Effects as much right now but if I could easily incorporate this into Flash/Flex and script and animate in a similar syntax and way I know After Effects would definitely have a boost in interest.

Also, the forgotten one Director, can we please get an ES4 based language in that application, or an update? Then kits and add-ons are much more possible. I really miss hardware accelerated 3d in browser as a pushed technology, Director is still around but it does not get the focus it needs. Feel the freedom and coolness just in this small test here in director, hardware accelerated 3d is the best, the Director application environment and Lingo and hacked in javascript are not the best. As a long-time Director user, hobbyist and professional I am disappointed in Director’s support at Adobe thus far, but I digress.

The Reality

The reality is right now the only problem with kits like Tweener, TweenLite, Tween, mx.transitions, mx.motion, etc is that the source has to be embedded in movieclips multiple times. Sometimes there are multiple animation kits per compiled SWF that have to be used for more advanced features. This adds bulk that if common might not need to be there (this comes into play still on mobile and large games/apps).

Let’s say you have an application that pulls in many disconnected SWFs and they all have animation in them, well if you have 20 of these let’s say, and you embedded a very small Tweener at 9k per SWF. That is about 200k of duplication of AS code. Due to the kits small sizes this is not a problem really but when animation kits like Animation Package come into play, you are talking 40k per SWF which would leave you with almost a meg of just duplicated animation code. I don’t think this is that major of a problem for kits like Tweener (9k compiled) and Tweenlite (3k compiled) but as projects get bigger and more depth of animation platforms needed this can be a problem. This can also be solved in architecture with a controller and dummy SWFs to animate but there are times when you need animation in the compiled SWFs and then also need it in many others and the controller.

The other reality is the animation kits (mx.transitions.easing, mx.transitions.tween) for Flex and Tween for fl are a little bloated, more difficult than needed to use and as has been seen, much slower than kits currently available in the community. My one fear about this is that if Adobe makes this, possibly like Microsoft’s toolkits and libraries they put out, they are always bloated and slower, then because they are embedded they are untouchable. If it was standard enough as building blocks that are faster because they are native, then this is the best option as embedded script would be hard pressed to beat native code in the players/applications.

The Future Plans

Some of this is underway….

Animation kits for future, Adobe is releasing Flash 10 called ‘Astro’ that has many new improvements in tweening with xml closer to flex or even Silverlight like transitions and storyboards. Aral Balkan, a sponsor of OSFlash, posted on this and even that Diesel Flash CS4 will include more Tween tools for IK/bones. Tweener , TweenLite, Animation Package, Animation System etc these are all helping to define the best way to do animation kits.

Physics toolkits have their own animation kits currently usually to handle the movement according to algorithms. FOAM, APE , Box2DFlashAS3 (just released very recently will be posting more on this after I check it) and Motor Physics (unreleased but heavily demoed at polygonal labs) are great physics toolkits and I like this being part of the community to get refined, maybe one of them or the best performing ones becomes part of the proposed Adobe Animation bundle. These will define the best way to do physics kits.

3d in flash toolkits have also been emerging rapidly in 2007 with Papervision3D, Away3d based on pv3d, Sandy, and even engines starting to get built on top of these platforms.

The general direction is moving towards another platform in there somewhere but I think much work is left to be done to standardized physics systems, 3d and advanced motion filter tweens and bezier, splines (Catmull-Rom), editors, etc. I think it is getting time for basic animation kits to become more standard though and in latest versions of flash this is included in the flex and flash scripts but not the native code.

Right now the standard in syntax and the broadest reach is Tweener and due to the bigger fish syndrome, haXe that can target any platform, it also has a Tweener and can create code for as2, as3 and any target written in if After Effects, Premiere or other apps get more robust and standard animation and motion kits. Tweener has kits made and contributed for AS2, AS3, haXe, Javascript and others.

There is also Hydra and the AIF Toolkit that are standardizing After Effects and Flash shaders and filters into a new shader language like Cg and reminiscent of

As humans we trial and error and build new platforms in the market to step on to create better platforms to build cool stuff, it is evolving right now. AS3 is inspiring platforms within platforms of Flash and Adobe kits as well as on Silverlight and in the Javascript world with JSTweener, jquery etc. As these things are refined we build a level standard platform to build more stuff on. Eventually this will be there and whoever does the standard platform for animation will probably reap in users and abilitty to easily add new products and solutions where people already have training. Silverlight is an example with .NET developers. .NET was also an example with C# so similar to Java. ES4 based AS3 has proven it is inspiring all types of new platforms and kits and will continue to do so and it is an interesting time in this industry whichever direction it goes.

Good Usable RIA Applications in Flash and Silverlight

Flash and Silverlight allow developers to make amazing tools, they allow creative expression and they also are usually a bad user experience many times.

Lots of that is changing as more applications are made and frameworks like Flex and Silverlight progress. Much of the needed performance is now available for Flash/Flex in AS3 and the AVM2 virtual machine that runs it, making full applications much faster for all actions that might have been a drag in AS2 and vector based application’s of the past. Some great tools were made with this still that were usable like gModeler a flash based UML modeling tool but the performance boost will make these applications even more usable for mainstream.

Some great examples of user friendly apps where the flash or the silverlight element doesn’t blind the developer from usability. These applications might really have a market for general users of applications from advanced depending on feature set as long as they are usable.

buzzword (Flash/Flex/AS3)

Is a word processor that is really well done. This is made with Flex and everything from validation to the toolset is very usable and clean. I use Google Docs and haven’t looked back for about a year but this application is a nice change to web editors for documents at the current state. It included all the usual basic functionality and great new zoom, revision history and sharing tools that web office tools like word processors has come to expect. Be sure to try this one.

scrapblog (Flash/Flex/AS3)
scapblog is a bloggy/presentation that is a great template editor and the tools are broad and expected from users including great integration with the web for photos and video at major sites such as photobucket, flickr, etc.

Google SearchMash (Flex/Flash/AS3)

This is a Flex 2 (actionscript 3) application that is very fast and usable in vector.

Sample Textured 3d Vista demo(Silverlight 1.0)

This demo showcases the speed of Silverlight and a usable OS like interface that performs well. It showcases Silverlight but also has great usability in expected user actions and results.

tafiti (Silverlight 1.0 demo)

Tafiti is a search tool that uses SIlverlight and live search to represent search results in a rich way. They did a pretty good job with usability and especially considering the Silverlight 1.0 lack of good input controls. Little bit laggy.

The point is solution developers should use technology but most importantly make it functional and usable to what users expect. RIAs will succeed very well as long as you can select text, hit back buttons, deep linking, use menu systems, integrate services, have all the features of apps not in vector engines like Flash or Silverlight and to make it mainstream friendly they need to have a low bar of entry and just work. RIAs have an advantage right now as office apps move to the web and photo apps as well, many of these apps above would appeal to general computer users in addition to advanced users.

HOWTO: Silverlight Preloader with Downloader

UPDATE: See a sample of this Preloader that allows many files to be downloaded.

There are some great videos and links on the downloader object from Microsoft for Silverlight.

In Silverlight you can create an object called a downloader that probably stems from the htc ie5.5 downloader that was part of ajax beginnings, it is ver similar to the XMLHTTP object but it has zip capabilities. This downloader can download individual files or zip file packages that you can grab xaml, xml, images, script etc from them and use them or load them in to xaml files. This helps to keep things compact and allows for preloaders and smoother beginnings of your animations where needed.

The zip downloading is attractive and much of this is going on in Flash AS3 with FZip or ASZip AS3 packages. These are made possible with ByteArray and BinarySockets and other fun tools that give no limits. In Silverlight all you have is javascript or the silverlight downloader object to get other data at runtime.

Downloading assets in Silverlight is different than in Flash. Flash compiles libraries to swf files, it can load pngs, it can preload anything in numerous ways. Silverlight does not compile to one file or into compressed binary currently and this offers flexibility but it also makes file sizes at their default size very big. PNGs for instance can’t be zipped any smaller usually but in Flash9 these are sometimes 1/10th the size of the actual file when compressed better in the SWF file. Even if you zip them in Silverlight they are still around the same size. Silverlight XAML files compress well and these can get very large if lots of pathing is used.

Flash has always been the master at smallest file sizes and even the player itself is extremely small, under a MB. Silverlight 1.0 which is just javascript is 1MB, the Silverlight 1.1 plugin with DLR support is going to be 4MB currently (it still is in alpha so it could come down).

Currently in Silverlight 1.0 this is just a javascript release, the DLR and C# version of Silverlight 1.1 Alpha probably has 6 months or a year. So with no byte array binary handling or sockets of any type except javascript ajax, downloader is your only option now. But it is a good tool for now to help with preloaders and bringing files in smaller to make your rich applications and games faster.
Currently the only createObject call that is supported is the “downloader” object. I would like to see more here like a “socket” object but when Silverlight 1.1 launches with C#/python/ruby support things may change in this regard.

To create a downloader you do this in javascript:

// Event handler for initializing and executing a download request.
function onMouseLeftButtonUp(sender, eventArgs)  //sample mouse button click
// Retrieve a reference to the plugin.var slPlugin = sender.getHost();    // Create a Downloader object.
var downloader = slPlugin.createObject("downloader");

// Add DownloadProgressChanged and Completed events.
downloader.addEventListener("downloadProgressChanged", onDownloadProgressChanged);

downloader.addEventListener("completed", onCompleted);

// Initialize the Downloader request.
// NOTE: downloader APIs disallow file: scheme
// you must run this sample over localhost: or off a server or the following call will fail"GET", "");

// Execute the Downloader request.

// Event handler for updating visual progress indicator
function onDownloadProgressChanged(sender, eventArgs)
// Calculate the downloaded percentage.
var percentage = Math.floor(sender.downloadProgress * 100);
// Update the Rectangle and TextBlock objects of the visual progress indicator.
progressText.text = percentage + "%";
progressRectangle.width = percentage * 2;

function onDownloadCompleted(sender, eventArgs)
// Retrieve the XAML content from the downloaded package file.
var jacketBrowserXaml = sender.getResponseText("jacketBrowser.xaml");

// Create the objects from the XAML content.
var jacketBrowser = plugin.content.createFromXaml(jacketBrowserXaml);

// Add downloaded XAML content to the plugin.
sender.findName("rootCanvas").children.insert(0, jacketBrowser);

// Retrieve a reference to the Image object representing the jacket.
var jacketImageSlice = sender.findName("jacketSlice");

// Set the Source property of the Image object to the specific jacket image
// within the downloaded Zip package file.

jacketImageSlice.setSource(sender, "rotation01_green.png");

This video is the quickest way to understand the whole downloader setup.But this is also a very simple example. The hard part is deciding where to put your preloaders and how to load things in. If you are putting your XAML in a zip file you will need to have a preloader in a container XAML file as the main control and then a Canvas object to load that XAML into. This complicates many things and is really a design approach from the beginning.

In coming posts I will be posting a multifile preloader, a single file preloader, a zip preloader and some sample setups for silverlight projects and Flash projects based on zip and direct preloading.

I will put this sample script to work below for preloading files in Silverlight 1.0:

// PreloaderMultifileClassLibrary.js
// The MIT License
// Copyright (c) 2007 Ryan Christensen, drawk llc
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.

// setup the namespace objects to be good javascript form
// Ag1 = Silverlight 1.0 library

if (!window.Sys)
window.Sys = {};

if (!window.Silverlight)
window.Silverlight = {};

Silverlight.createDelegate = function(instance, method) {
return function() {
return method.apply(instance, arguments);

B.Ag1.PreloaderMultifileAssets = function()
// TODO alow JSON or Array passed
// loads up the asset arry to cycle through
this.resourceArray = new Array();

B.Ag1.PreloaderMultifileAssets.prototype =
loadAssetsArray : function()
this.resourceArray[0] = "spinner.png";
// add your images/zips/files to load here
for (var i=1; i<=16; i++)
this.resourceArray[i] = "drive_in_files/image" + i + ".png";
this.resourceArray[i++] = "drive_in_files/bg.png";
this.resourceArray[i++] = "drive_in_files/c1.png";
this.resourceArray[i++] = "drive_in_files/c2.png";
this.resourceArray[i++] = "drive_in_files/c3.png";
this.resourceArray[i++] = "drive_in_files/c4.png";

// total pages available
B.Ag1.PreloaderMultifile = function(control)
this.plugIn = control;      // Store the host plug-in
this.currentDownload = 0;   // Current resource to be downloaded
// this.maxNumPages = maxNumPages;
this.preloaderMultifileAssets = new B.Ag1.PreloaderMultifileAssets();
// alert(this.preloaderMultifileAssets.resourceArray);

B.Ag1.PreloaderMultifile.prototype =
downloadAssets : function()
var _file = this.preloaderMultifileAssets.resourceArray[this.currentDownload];
if(_file != null && _file != undefined)
this.downloader = this.plugIn.createObject("downloader");
this.downloader.addEventListener("downloadProgressChanged", Silverlight.createDelegate(this, this.downloadProgressChanged));
this.downloader.addEventListener("completed", Silverlight.createDelegate(this, this.downloadCompleted));"GET", this.preloaderMultifileAssets.resourceArray[this.currentDownload]);
downloadProgressChanged : function(sender, args)
var progressRect = this.plugIn.content.findName("progressRect");
progressRect.width = (sender.downloadProgress) * 450;
downloadCompleted : function(sender, args)
var progressText = this.plugIn.content.findName("progressText");
var progressPercent= this.plugIn.content.findName("progressPercent");
if (this.currentDownload < this.preloaderMultifileAssets.resourceArray.length)

progressText.text = "Downloading: " + this.preloaderMultifileAssets.resourceArray[this.currentDownload];
progressPercent.text = parseInt((this.currentDownload/this.preloaderMultifileAssets.resourceArray.length)*100) + "%";"GET", this.preloaderMultifileAssets.resourceArray[this.currentDownload]);
// Hide progress UI
var downloadUI = this.plugIn.content.findName("downloadUI");
downloadUI.isHitTestVisible = false;

progressPercent.text = "100%";
progressText.text = "Downloading Complete";

// initialize canvas and anmiations
this.plugIn.content.findName("innerCanvas").Visibility = 'Visible';

If you change your Silverlight handleLoad to something like this you can use the class above for list of files before it plays the xaml animations and presentation.

handleLoad: function(plugin, userContext,  sender) { // be sure to add these parameters, by default they are not added
// alert( + " : " + userContext + " : " + sender.toString());
plugin.content.findName("innerCanvas").Visibility ='Collapsed';
plugin.content.findName("innerCanvas").Opacity = 0;
var preloader = new B.Ag1.PreloaderMultifile(sender.getHost()); // pass in the silverlight control

I will have a complete tutorial of this soon.