This is the third Image Rotator sample. It is totally original (But you may find something similar from the Internet).
I am thinking to make more image rotators and package all of them as an Open Source Project. Please support me if I really make it. Haha.
A splash screen is added to save your CPU resources. Simply click on it to view the effect!
Vote for this sample
Comparison
Flash implementation: 30 minutes
Silverlight implementation: 30 minutes
What’s the difference?
- Object Container: Array [AS3] vs String [], List<String> [C#]
Source codes
Random Expand Rotator [Flash 9, AS3] (216.3 KiB, 575 hits)
Random Expand Rotator [Silverlight 2, C#] (249.6 KiB, 662 hits)
Flash
Silverlight
String Array [AS3] vs String [], List<String> [C#]
AS3 and C# are completely different when handling the Array. In AS3, an Array can be used to store everything. You may even use it to store the Class and Function. However, it means that you need to be carefully when getting the values from the Array since no one sure what is stored inside. Here is an simple demonstrator.
// AS3
var array : Array = new Array();
array.push(new MovieClip()); // push an object
array.push(MovieClip); // push a class
for(var i:int = 0; i < array.length; i++){
trace(array[i], array[i] is MovieClip, array[i] is Class);
}
// return
// [object MovieClip] true false
// [class MovieClip] false true
While in C#, you must define the type of the array clearly. You may either create a static array (String [] array), which means you can’t add/remove object once it is created, or a dynamic array (List<String> array
// C#
// static array
String[] images = { “image1.jpg”, “image2.jpg”, “image3.jpg” };
// dynamic array
List images = new List{ “image1.jpg”, “image2.jpg”, “image3.jpg” };
images.Add(”image4.jpg”);
September 10th, 2008 at 10:34 am
hi, found very good sl effect sites mentioned here http://timheuer.com/blog/
http://www.nikhilk.net/Silverlight-Effects-Transitions.aspx
and
http://www.cellbi.com/SvLite/Demo/SvFxDemo.html
September 10th, 2008 at 11:31 am
the effects of SvLite(SvFx) are extremely awesome, tons of great effects for us to learn, highly recommended :)
September 11th, 2008 at 3:38 am
Awesome blog ! Thanks so much to help both Flash and SL cultures to meet together ! :-)
September 11th, 2008 at 4:01 am
unruledboy and Larurent. Thanks a lot! I hope you guys will like it!
September 12th, 2008 at 3:49 pm
[...] Flash vs Silverlight: Random Expand Rotator [...]
September 23rd, 2008 at 6:11 am
Very cool stuff. I literally went “Wooo!” when I saw the effect.
Personally, I don’t see a huge difference in the UX between Silverlight and Flash.
October 21st, 2008 at 9:14 pm
Good day! clomid success stories
October 22nd, 2008 at 3:28 am
Hi! cialis generic india
November 8th, 2008 at 6:45 pm
With c#, you can use an array of object if you don’t want to specify the type conatined. You can then cast the object to whatever type you need to use the objects’s methods and properties. Furthermore, you can use an ArrayList instead of an array if you want the size to be dynamic and be able to add/remove items.