Flash vs Silverlight: Simple Drawing Silverlight vs Flash: Simple XML Parser
Sep 10

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

Flash is Better? (169 votes)
Silverlight is Better! (172 votes)

Comparison

Flash implementation: 30 minutes  
Silverlight implementation: 30 minutes 
What’s the difference?

  • Object Container: Array [AS3] vs String [], List<String> [C#]

Source codes

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). There are many more object containers under the namespace [System.Collections.Generic] which serve for different purpose.

// 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”);

Related Post

9 Responses to “Flash vs Silverlight: Random Expand Rotator”

  1. unruledboy Says:

    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

  2. unruledboy Says:

    the effects of SvLite(SvFx) are extremely awesome, tons of great effects for us to learn, highly recommended :)

  3. Laurent Says:

    Awesome blog ! Thanks so much to help both Flash and SL cultures to meet together ! :-)

  4. admin Says:

    unruledboy and Larurent. Thanks a lot! I hope you guys will like it!

  5. Silverlight Cream for September 10 -- #365 Says:

    [...] Flash vs Silverlight: Random Expand Rotator [...]

  6. Justin-Josef Angel Says:

    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.

  7. acickeree Says:

    Good day! clomid success stories

  8. acickeree Says:

    Hi! cialis generic india

  9. Domnik Says:

    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.

Leave a Reply