Oct 27
Another mathematical sample extracted form previous project. You can grab the icons on the application, move your mouse and then drop it. The object will move with various velocity according to your movement speed.
I used CompositionTarget.Rendering in Silverlight to compare with the ENTER_FRAME event in Flash. It seems that the Flash version is a little bit laggy.
Comparison
Flash implementation: 30 minutes
Silverlight implementation: 75 minutes (Implemented First)
Source codes
Throwing Object [Flash 9, AS3] (304.9 KiB, 2,243 hits)
Throwing Object [Silverlight 2, C#] (161.2 KiB, 3,291 hits)

October 27th, 2008 at 8:13 am
Silverlight has a faster framerate on this one. Also, you can’t ‘drag’ the icons out of the application like on Flash.
Flash fails once again. Go Silverlight!!! =D
October 27th, 2008 at 8:45 am
Probably you have something wrong with your flex app, since it does not load CPU for 100% (or even 50%, i.e. one core for 100%), so frames are dropped for some other reason. I’ve developed much more heavy app and it is drawn faster. Did you set the frameRate param of the main app object?
p.s. you can check my app at:
http://geo.su/map/
click the “Спутник” button at the top to see the satellite images
October 27th, 2008 at 10:02 am
the throwing behavior of sl seems not so accurate, it sometimes did not “flew away” when the mouse released, it still “captured” by the mouse.
October 27th, 2008 at 10:29 am
Set the frame rate higher than the typical 24 FPS and you will see the same behavior as you see with Silverlight.
October 27th, 2008 at 7:13 pm
Btw, Flash drawing quality is much better than Silverlight’s one:
http://www.hot-keyboard.com/dk/FvsSL.png
October 27th, 2008 at 10:23 pm
Yes, there are some problems regarding the mouse move out of the appliction. I still don’t have idea how to fix that yet.
Dmitriy, thanks for the information. How did you make your screen capture?
October 28th, 2008 at 2:05 am
admin,
you can try Event.MOUSE_LEAVE to get the point when the mouse is moved out.
I’ve just clicked the Print Screen button to get my entire screen into the clipboard. Then I’ve used photoshop to quickly crop and layout picture.
btw, I’ve downloaded the flex source for this example, how can I compile it? mxmlc.exe compiles Document.as only and doesn’t want to link ThrowingObject.fla… maybe this question is already discussed somewhere else, but I’ve been programming flex not so long and usually use IDE and mxml apps :)
October 29th, 2008 at 1:24 am
Dmitriy, thanks for the suggestion. I think it’s not difficult to fix the Flash mouse leave problem. But I think the Silverlight can’t really detect if the mouse has left the appilction..
By the way, you can’t compile it in Flex. It’s because I have embed all the reousrces in the IDE.
If you really want to work in Flex, then you have to save out all the images and embed them in Flex. (Throught it’s complex, it wouldn’t take you too much time)
March 3rd, 2009 at 6:57 pm
Hello webmaster
I would like to share with you a link to your site
write me here preonrelt@mail.ru
July 15th, 2009 at 7:07 am
[...] del.icio.us Silverlight vs Flash: Throwing Object SEOmoz | SEO Best Practices: SEOmoz’s New Policies 10 Awesome Free Photoshop Brushes | Abduzeedo | [...]
July 16th, 2009 at 12:20 am
[...] Silverlight vs Flash: Throwing Object An interesting code repository site. Comparing SL samples vs. Flash samples. They share the source code, too! (tags: silverlight flash) See the original post here at Visualrinse | Design and Development by Chad Udell [...]
July 16th, 2009 at 2:17 am
Hi !
I was really surprise by your flash perf test since I’ve never meet any rendering like that for such a small task.
MOUSE_MOVE Event follow is own FPS timing. You should add e.updateAfterEvent(); in your on_mouse_down method, then the rendering will be reallllllyyyyyy smarter :) (http://minuit4.fr/stuff/ThrowingObject_24.swf)
I’m also wondering if Silverlight & flash use the same amount of FPS cadency ?
Because with 50 FPS in flash, I have the same experience as your exemple in Silverlight (I’ve not the required IDE for it :/) : http://minuit4.fr/stuff/ThrowingObject_50.swf
April 12th, 2010 at 1:13 pm
i have problem creating more class….it is possible to turn the throwing object into game?
July 13th, 2010 at 9:27 am
[...] Flash Silverlight Download [...]