Sorry for my absents into blogsphere but I have big excuse, MIX was happen to me, and I'm still "on impressions" and also I have plaint of job on work that need to be done on time, so here are me. I promise that this will never happen again
If you ever been developed some RIA into Flash, than certainly you are very familiar with data transfer problem. I do not like to sound pretentious, but when I first start to seeing Silverlight as a promising platform, I checked this functionality.
Preload is simple - EUREKA !!!
The zip downloading is attractive and much of this is going on in Flash with FZip and/or ASZip, in Silverlight is different than in Flash. Into Flash world swf filec can't be compressed with significant difference, but in Silverlight world, XAML files (txt files) compress very very well.
So I found this VIDEO "USE THE SILVERLIGHT DOWNLOADER"
There actualy one magic Javascript
// Event handler for initializing and executing a download request.
function onMouseLeftButtonUp(sender, eventArgs)
{
// Retrieve a reference to the plug-in.
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);
} |
// Event handler for initializing and executing a download request.
function onMouseLeftButtonUp(sender, eventArgs)
{
// Retrieve a reference to the plug-in.
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
downloader.open("GET", "promo.png");
// Execute the Downloader request.
downloader.send();
} |
You can find more about preloads in MSDN Downloading Content on Demand in Silverlight
Also you can find very intresting things on David Kelley's Blog and certainly on Ryan Christensen's Blog "draw*logic"
"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"
- Ryan
The hard part is deciding where to put your preloaders and how to load things, so that's why somewhere there exists Developers, not just Coders :) Right?