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.
Vote for this sample
Flash is Better? (295 votes)
Silverlight is Better! (301 votes)
Comparison
Flash implementation: 30 minutes
Silverlight implementation: 75 minutes (Implemented First)
Source codes
Throwing Object [Flash 9, AS3] (304.9 KiB, 932 hits)
Throwing Object [Silverlight 2, C#] (161.2 KiB, 1,312 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