Sep 08
Today, I would like to show you a Flash vs Silverlight comparison on the Sliding Image Gallery!
The effect is a simple and dynamic Sliding Gallery.
It is very easy to customize. We can add as many images and descriptions we like .
And the effect is very good for fast photo gallery, scrolling banner, website and so on.
Let’s enjoy it and leave comments!!
Comparison
Flash implementation: 40 minutes
Silverlight implementation: 30 minutes (Implemented First)
Source codes
SlideGallery [Flash 9, AS3] (965.2 KiB, 2,037 hits)
SlideGallery [Silverlight 3, C#] (1.1 MiB, 4,221 hits)

September 8th, 2009 at 9:25 am
Why is there such a speed difference between the Flash and Silverlight versions? Also, strange artifacts can be seen in the Silverlight version. Is the plugin so bad at rendering?
September 8th, 2009 at 9:58 am
The artifacts are present in the flash version if you pay close attention. It’s just a little harder to see because of the speed so the question is why the speed difference?
September 8th, 2009 at 11:23 am
Silverlight is faster at rendering to the screen. No surprise there, since most of the heavy lifting is being done by the .Net framework (hardware bitmap drawing). This would be a bit more compelling if the tweening algorithms had been the same for both.
If you need raw easing equations, there are many out there, and I have several that could be used in both environments.
September 8th, 2009 at 12:52 pm
I think Kos means that the flash is way faster. certainly true on my screen.
As said, it’d be nice to see 2 applications moving things at the same speed and a report of the frame rates for comparison.
This demo looks like it’s been made to purposefully inhibit comparison.
September 8th, 2009 at 2:31 pm
I bet this would be faster to implement in javafx.
September 8th, 2009 at 3:20 pm
About speed… DO NOT FOGET….
1) Flash animation just render frames. Flash have no classical “timeline”. So if there 20 frames that could be rendered for 1 sec if would render it for 1 sec even if you what 2 sec… (there is a way to avoid this but this is default)
2) Silverlight concept is different. Silverlight animation is hardly binded to timeline… So, if there is 20 frames that can be rendered for 1 sec, Silverlight will render them for 2 sec (ofcource if you say that you whant it done for 2 sec)…
So this is the “speed” diffrenses.. Plz. calculete speen using FPS, and NOT you fillings.. :)))
September 8th, 2009 at 6:15 pm
I did not understand that last comment.
I also fail to see the intent of the comparison.
Flash is faster? Silverlight does slides prettier/smoother?
September 8th, 2009 at 7:50 pm
I agree that the speed differences make a comparision difficult. The one thing that was very easy to determine though is that Les Stroud is a moron.
September 9th, 2009 at 1:22 am
OK… I will explain post 7…
Flash uses frame animation:
so you have 20 frames, animation takes 1 second, everything is nice…
BUT if your computer will lag a little, animation will take 2 seconds, because EVERY frame will be drawn…
Silverlight uses timeline animation:
so you have storyboard with 3 render transform changes, animation takes 1 second, everything is nice…
AND if you computer will lag a little, animation will take 1 second, because it uses helper functions to simulate bounce (this sample), or something else.
That’s WHY silverlight app is MUCH smoother than flash!
September 9th, 2009 at 1:27 am
This does not explain why the flash animation is so much faster (except if the author meant it to be like that). Flash does have the target FPS that it is trying to achieve and for a such a simple animation there should not be any lag.
…
Why am I even bothering to write this …
September 9th, 2009 at 11:25 am
I think what he is saying is the flash animation renders faster/slower based on the speed of your computer, while the silverlight animation renders based on a pre-determined time line. So that if your computer is faster the silverlight version will just render more frames instead of speeding the entire animation up.
September 9th, 2009 at 11:28 am
Sorry after comparing these two again the flash animation bounces, while the silverlight animation has no bounce. Both seem to run in 1s. Can you remove bounce from the flash version for a more even comparison?
September 9th, 2009 at 11:39 am
Ernestas - You can use time-based animation in Flash, but your framerate will determine how many frames are drawn to the screen. Downloading this sample, I can see it’s set to run at 24 fps. After I increased it to 60 fps, the animation was much smoother, even with the sharper bounce. I imagine Silverlight draws to the screen as fast as it can no matter what, being a time-based tool.
I also looked up Microsoft’s easing equation for BackEase, but had trouble adapting it to Actionscript (spent way too much time on it :).
This is a flawed comparison, because the tests aren’t equal, and I’m not sure what the author is actually trying to prove.
September 9th, 2009 at 11:56 am
Hum… I don’t get the idea of the comparison… not exactly the same animations…
September 9th, 2009 at 2:18 pm
Silverlight has bounce. Just find timeline and click on a keyframe… On the right in Blend window you should see Easing functions. One of them is bounce…
Plus…
Hmm… Silverlight still could to it faster (i mean “visualy faster”)…
Equals…
Just **** (very censored…):
http://silverlight.services.live.com/invoke/99396/SilverGoogle/iframe.html
September 9th, 2009 at 2:21 pm
Only web and image search available, in addition, buttons on the top works too.
(It is s*** but still it is only 17 year old work…)
September 9th, 2009 at 3:05 pm
Such a poor example. :-/ I’m not defending Flash with this comment…just clarifying it as a bad example.
There isn’t a need to sound extra smart, etc about why the Flash example runs faster. You’re forcing an elastic tween into 1 second. If the Silverlight example used the same tween type it would be faster as well. Notice the Flash tween bounces back and forth 3 or 4 times. Silverlight goes beyond the point then back to to the point. Huge difference.
Change from Elastic to another tween and it will look similar.
Just a lil’ clarity.
September 9th, 2009 at 4:16 pm
I don’t understand why I how a 1 second tween can be anything but “fast”. If you want it to look fast, add some motion blur. What I would find much more interesting is to see the differences in code to produce the same result or the amount of time it took you to build each example.
September 9th, 2009 at 10:38 pm
Hi all, sorry for the confuse I have made in this sample. I could explain the details.
However, first of all, my intention of this post (as well as my blog) is to provide good materials for developers to learn more about both technology. That’s why I always provide source code.
The differences of the animations is caused by this:
1. The frame rate of Flash is 24. (I used to use 24 for years and it’s a habit for me to set to 24 to save CPU time). However, the frame rate of Silverlight is 60 by default. It’s my mistake I didn’t set the frame rate to the same. But I think it’s a good chance to let you guys know more about frame rate different.
2. The easing method of the tween/Storyboard is different in Flash/Silverlight. Frankly speaking, I attempted to find the same easing method in Flash. But the documentation in Flash 9 is not easy to read, I just pick one of the easing method and complete the task.
The ease method in Flash is Elastic.
The ease method in Silverlight is BackEase.
September 9th, 2009 at 11:31 pm
Exactly.
September 10th, 2009 at 12:36 am
nice job but great mistake :). Thanks hope it will help a lot
September 10th, 2009 at 4:49 am
Flash has a “Back” easing method as well: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/transitions/easing/Back.html
September 16th, 2009 at 3:55 am
Just wanted to point out to Ernastas (comment #9): Flash doesn’t render EVERY frame at all but actually skips rendering a frame if there is not time to do so. However, if you have code on the timeline this frame script will be run EVERY frame but the graphics may not be rendered in the end. You can still choke flash though if you have a lot of script running every frame (this can make tweens run a fraction longer than expected but not much longer).
September 19th, 2009 at 6:38 am
The Flash app doesn’t work for me, it’s broken. Perhaps its a Flash player version issue at my end.
The Silverlight app works nicely, very smooth, very crisp, very fast — nice demo. This is SIlverlight 2. Silverlight 3 is even better. I hope this page can be updated to use SL3.
September 21st, 2009 at 6:52 pm
Not to distribute guilt nor offend the author nor anyone for this matter but, nobody can make a comparison between flash technology and silverlight technology, they are both extremely different technologies and work with a different framework and programming language, that only proves why you or i can not compare this two technologies.
Yes, they both have something that anyone can see that it looks like they are alike, but they are not, so…lets now get to some specific “veritas” TO PROVE MY “CASE”!.
The thing about Frames Per Second (FPS) is not really a factor to determine that they are very different and that they ca not be compared, but it is part of the main factor, flash works with FPS, silverlight does not it seems, unless i am really wrong about that.
The FPS subject on flash technology is all about the frame rate, how many frames it will show per second, obviously if a computer is slow, it will not show the 25 or 30 frames per second or whatever but, the thing is that silverlight does not work with FPS, it works differently, so we can not compare if the animation above is smoother or faster.
Just for you now, the speed of the animation can be set in flash as well as in silverlight, and this seems like a very complex example for a comparison between flash and silverlight, even knowing that they are both very different technologies.
Try to create an example of simple animation, perhaps a frame by frame animation in flash and a frame by frame animation in silverlight, it that is possible of course.
September 21st, 2009 at 8:32 pm
“Not to distribute guilt nor offend the author nor anyone for this matter but, nobody can make a comparison between flash technology and silverlight technology”
I agree with that, any comparison would be foolhardy. Flash is an endless series of hacks in an attempt to turn something that was meant to do nifty animations into a RIA platform. Silverlight on the other hand was designed from the ground up to be a RIA platform.
September 21st, 2009 at 9:34 pm
@Jack Bond
Haha…now that is a hilarious statement. Flash hasn’t been purely an animation tool since Flash 6. We’re on 10 now. :-)
@Jack Bond/@Flash Clocks
There are definitely ways to compare the two but you have to understand there is a clear differences in the ways they are implemented (ie - frames). Both are for RIAs so Flash, Silverlight, JavaFX, etc will always get compared and that’s ok because ultimately that’s what we do when we choose a stack to invest in.
September 21st, 2009 at 9:42 pm
@Jack Bond
Sorry…correction. Flash 4 was pure animation, 5 was web sites/banner ads, and 6 was the introduction of RIAs to the industry. I just wanted to make that distinction since after a re-read it wasn’t exactly accurate.
September 21st, 2009 at 9:45 pm
@John Bland
“Flash hasn’t been purely an animation tool since Flash 6.”
I didn’t say that it was, I said that it was an endless series of hacks attempting to turn one thing into another. For example, does Flash 10 support native threads? No? So, Flash 10 isn’t getting proper threading support, it’s getting yet another hack. Hacks upon hacks upon hacks. Honestly, if Flash can’t even get threading right, you might as well just torpedo the platform. Silverlight 4 is probably going to have the .NET Framework 4’s parallel extensions which will just make Flash look even more ridiculous.
September 21st, 2009 at 10:03 pm
@Jack Bond
I’m not going to get into a back and forth but: “Flash is an endless series of hacks in an attempt to turn something that was meant to do nifty animations into a RIA platform.” Huh? Okie dokie…not saying it is an animation tool trying to be a RIA platform? :-)
Threading is needed, I won’t deny, but without threading we should trash the platform? Really? Quite a narrow view there dude.
Silverlight has C# which is miles ahead of AS3 and has nothing to do with Silverlight. C# simply rocks the socks off numerous languages (on the client and server) but Silverlight does not rock the socks off Flash hands down, or vice versa for that matter. Both blow each other out in multiple ways.
So paraellel extensions potentially makes your code better but bottom line is the end result, right?. If a Silverlight app works just as well as a Flash app, sweet. Vice versa? Sweet. Does it matter if you used threading, parallel extensions, design patterns or anything else under the hood? Nope.
Fanboyism won’t win you any special seat at MIX this year. ;-) lol
(not responding to anymore because I’m not interested in a platform battle as it is fruitless)
September 21st, 2009 at 10:20 pm
“but without threading we should trash the platform”
Kinda hard to make real apps without decent threading support.
“If a Silverlight app works just as well as a Flash app, sweet. Vice versa?”
Um, just how exactly is a Flash app going to work just as well as a Silverlight app when it’s stuck on a single thread on a single core? I’m not talking some sort of abstract trifle here. As future CPU development is stressing parallelism, this is only going to get worse.
You say C# is miles ahead of AS3, which it obviously is. If I’m a developer and I can write apps 10 times more quickly in Silverlight because of the language and the unbelievable quantity of 3rd party libraries, why am I going to waste my time with Flash? It’s really comical how you divorce ease of development from quality of app. I suppose if the development language for Flash was assembly that would have no impact on app quality? Riiiiiight.
“Fanboyism won’t win you any special seat at MIX this year”
I live in Vegas and I don’t go to Mix. Conferences are pointless relics from the pre-web age. I might meet some nice people, but I can do that hanging out at the bars at Mandalay after hours.
September 21st, 2009 at 10:25 pm
Hehe…cool beans man. Thanks for the reply.
September 28th, 2009 at 6:25 pm
Hi,
For comparison, I implemented a version of this app using Apache Pivot. The results are here, if you are interested:
http://ixnay.biz/pivot/1.4/demos/slide_gallery.html
Greg
September 28th, 2009 at 6:27 pm
Your example is amazing on IE8, I’ve never seen:
End tag ‘head’ does not match the start tag ‘link’. Error processing resource ‘http://ixnay.biz/pivot/1.4/demos/slide_galle…
–^
animate so smoothly. It’s like it isn’t even moving.
September 28th, 2009 at 6:44 pm
Thanks - hadn’t tested in IE. Should be fixed now. :-)
September 29th, 2009 at 8:23 am
Wow, Jack, your reply is amazing, I’ve never seen such pomposity demonstrated with such ease.
It reads so easily. It’s like you /really are/ an ass.
September 29th, 2009 at 1:34 pm
Thank You! I must admit it though, I had to work on it. Just like James Gosling really had to work hard to make a language that sucks as much as Java. There are tons of reasons that Java isn’t used as a client framework, and JavaFx has simply added to the pile. Pivot seems to be so irrelevant, it doesn’t even have a Wikipedia entry.
September 29th, 2009 at 1:53 pm
Great suggestion, Jack - thanks. I just created a Wikipedia entry for Pivot.
September 30th, 2009 at 10:51 pm
One big advantage of Apache Pivot is it’s Open Source ( and it’s improving every minute ) under the Apache License, next is that it can run as a normal desktop application w/o changing any of your pivot code 100%, and last, imo, Apache Pivot is the answer to the replacement of Swing.
I’m currently using Apache Pivot and it’s awesome!
September 30th, 2009 at 11:39 pm
An open source framework built on top of a closed source platform. Woohoo. Yet another UI framework, how many is Java up to now, 8000? Have they implemented LINQ? How about runtime generics? How about delegates, or is Gosling still being a deuche bag about those? Java, particularily on the client, is a total unmitigated disaster. You like Pivot, some other developer likes JVomit, another one likes, JPuke. They all do the same thing, but in completely different ways. What a horrific development ecosystem.
October 1st, 2009 at 9:30 am
Jack, I love the fact that you’re the Microsoft ambassador here.
October 1st, 2009 at 11:04 am
@Reinhardt
I know right. :-D
October 1st, 2009 at 1:45 pm
More like the common sense ambassador. Just google ‘java is dead’ and never mind whether you agree with any of the arguments, the fact that people are having the discussion is a pretty strong indicator where the industry is headed. It was a piss poor client platform from day one, and the morons at Sun could never figure out why.
October 1st, 2009 at 1:50 pm
@Jack Bond
Oh you mean the platform I can deploy across multiple servers (not just Windows), there are thousands upon thousands of great predeveloped components/libraries built, and integrates with practically anything? That one? Yep…she’s a goner. :-D
Nah…seriously though. I LOVE Microsoft dev products but you have to open your mind Jack. C#/.NET is not the best platform for every scenario. C# just got delegates so was it a poor language before then? 4.0 brings new stuff to the table other languages have had for a while. Does that mean C# 3.0 is bad? Nope.
Just open your mind man…the world doesn’t revolve around .NET.
October 2nd, 2009 at 3:54 am
@Bond, Jack
closed source platform? The Java platform?
October 18th, 2009 at 6:16 am
Я, хоть и не ваш постоянный читатель, но всё же скажу свое мнение. На ваш блог попал совсем случайно. Однако нашел много чего нового и интересного. Так что, как говорится, пиши еще :)
November 8th, 2009 at 4:19 pm
Couple of things, that have been commented on but not rectified/adressed.
The test isn’t valid unless you use the same tween for both examples. It doesn’t need to be a fancy bounce, just make it the same.
The alpha on the control buttons. is this a limitation oif silverlight ?
I’m a senior flash developer in my company and have just installed the vs 2010 beta 2 and was thinking about playing with some silverlight, as the limitations of flash just get annoying at times. Its great for simple or complex websites but technology demos and dazzling that we have to do in the advertising industry tend to start showing stressed seams.
I looked at the 3d one you did, much better as the animations were the same for each. Silverlight actually outdid flash for me, most natably in the 100 picture animation. Which was surprising.
Thanks.
November 24th, 2009 at 2:04 am
you can remake the silverlight version in blend 3 in a minute or two using only the mouse, no code
December 22nd, 2009 at 12:27 am
Ну точно, как люди говорят, любопытное рядом! :)
January 16th, 2010 at 6:13 am
Sorry, aber das bezweifel ich ganz stark…
February 10th, 2010 at 7:00 am
that is great. silverlight is good.
April 19th, 2010 at 8:59 am
I just love FLASH!! Adobe has every reason in the world to make Flash work on as many platforms as possible, while MS has as strong reasons to ensure Silverlight does NOT run (properly) on non-windows platforms. :-P
April 20th, 2010 at 1:12 am
The problem is the yet another plug-in issue. It’s true that most people have Flash because of Youtube.com Needing to install another plug-in environment is becoming a very large hurdle for content providers. Also, consumers don’t want to return to the situation in the late 1990s when we needed a dozen plug-ins to view video from our favorite sites, each of which needed at different plug-in. Consumers are saying, well we’ve already got flash installed, why shoul d we installand maintain another plug-in environment.
April 20th, 2010 at 2:35 am
^^ “Consumers are saying, well we’ve already got flash installed, why shoul d we installand maintain another plug-in environment.”
why? features, performance.
also, silverlight is the binary platform used on windows phone. writing an applet once and publishing it on the web and also a major mobile platform is just good business.
also, silverlight has DRM. content owners like DRM.
also, silverlight is based on a variant of the .NET runtime, making a huge amount of source code, documentation, and tools available to application developers. flash lives in a closed ecosystem.
also, silverlight is based on standards ratified by bodies like the ISO. parts of flash are loosely based on standards but it mainly just has some poor and outdated vendor documentation efforts.
April 20th, 2010 at 5:11 am
“Consumers are saying”
Yah, that’s what consumers or saying. Or rather you just pulled that out of your rear end. “Install and Maintain?” Seriously, I don’t even know what crevice you pulled that one out of. Click, 5 seconds later, done. Silverlight and Flash aren’t 300MB behemoths that require IT teams to manage. There was some moron from Adobe, I think his name was Ted, on the Silverlight forums a couple years ago, and his most compelling reason for using Flash or Silverlight was the installed base. As if end users were picking between MS Office and Star Office. If the first thing that comes to mind in what sets you apart from your competition is that you’re installed, you might as well close shop.
The dopes at Adobe can’t even figure out how to implement threading. Add them to the list of companies Microsoft destroyed, it’s only a matter of time.
April 20th, 2010 at 11:51 am
once upon a time java was the big thing and flash was the hopeless/pointless/deficient newcomer according to sun and the java community, but better technology (mainly vector graphics) won the day and now java is on life support
also i forgot a critical point: security. flash seems to be an endless source of fun for malware people.
April 20th, 2010 at 11:55 am
Hey folks, I suggest a bit of research before making broad claims (ie - malware fun box, Adobe can’t figure out threading, etc). I have no intention in arguing these points but find it prudent for you guys to learn a bit more before making false statements/assumptions.
@Nitro
Flash had 99.8% penetration before YouTube existed. YouTube merely increased the adoption rate. That’s wildly different than being the reason why most have Flash since most already had it.
April 20th, 2010 at 12:13 pm
http://www.google.com/search?q=flash+vulnerability
there’s practically been a flash security issue on a weekly basis for years, and if you include pdf/adobe reader, adobe has really been in a league of their own for creating vulnerabilities for malware vendors to exploit
April 20th, 2010 at 12:27 pm
Again, research and provide specifics as to what is the actual culprit. Blanket Google slaps aren’t proof. Some of those links point to vulnerabilities in ActiveX or some other component, which affects the runtime.
Understand I’m not saying Flash has no security issues but all software does (Silverlight, Java, QuickTime, Safari, and even this OS I’m typing on had a security update this week). It isn’t uncommon in software.
You’ll have to do better than that though. Prove to me Flash is an “endless source of fun for malware people.”
April 20th, 2010 at 2:57 pm
@JohnC
Broad claims? Your problem John is that I know SO much more than you that you’re not even in the same league. Here educate yourself,
http://blogs.infosupport.com/blogs/alexb/archive/2010/03/01/flex-4-a-multi-threading-solution.aspx
Green threading is not threading, and as processors become more parallel this becomes an even worse of a problem. So, like I said, Adobe can’t even figure out threading.
Now, let’s consider Flash vs Silverlight in the context of security. One is remarkably secure, I can’t even recall a single issue in the last couple years. The other is a complete and total security joke. This shouldn’t come as a surprise though. Developing secure applications is difficult, and if you can’t even figure out threading, well, you’ve got problems.
Finally, a demonstration of how to make a new native operating system thread in Silverlight.
Thread newThread = new Thread(EntryPoint);
newThread.Start();
And the equivalent in Flash…
Research the web for a few hours and realize it’s impossible, you’ve selected a crap platform.
April 21st, 2010 at 1:35 am
Народ в таких случаях так говорит - Авось задатка не дает. :)
May 5th, 2010 at 2:57 am
Da Fake da mara..
June 17th, 2010 at 5:31 am
Hi, I like the Shrek movies, very good animation!
October 1st, 2010 at 8:26 am
Long time reader, first time commenting. Just wanted to say how much I enjoy reading your site. Many thanks.
June 11th, 2011 at 7:50 am
if its on.. its in
December 9th, 2011 at 3:38 am
Spot on with this write-up, I actually assume this site wants way a lot more consideration. I
January 5th, 2012 at 3:22 am
very good, it’s very useful to me, thank you very much!
———————
runescape gold, http://www.playersaid.com/runescape-gold/