Sep 20

By just adding a little more on the Carousel, you can create a brand new Crousel effect. Today, I am presenting you the advanced Carousel Effect which support various layers with additional Drill Down and Drill Up effects.

You can also experience how did I simulate the frame based animation by StoryBoard. A pretty good reference for you to learn Silverlight.

Vote for this sample

Flash is Better! (406 votes)
Silverlight is Better? (352 votes)

Comparison

Flash implementation: 50 minutes
Silverlight implementation: 1 hour (Implemented First)
What’s the difference?

  • Tween [AS3] vs Storyboard [C#]

Source codes

Flash

Silverlight

Tween [AS3] vs Storyboard [C#]

In AS3, the Class fl.transitions.Tween is very similar to StoryBoard in C#. Below is a simple demonstration which fade out an object in 3 seconds.

// AS3
import fl.transitions.*;
import fl.transitions.easing.*;

var storyBoard:Tween = new Tween(displayObject,  "alpha", None.easeOut, 1, 0, 3, true);
storyBoard.addEventListener(TweenEvent.MOTION_FINISH, on_motion_finish);

function on_motion_finish(e:TweenEvent):void{
	trace("finish");
}

What about in C#? let’s see how can we create Storyboard purely by code. Please be careful when using Storyboard.SetTargetProperty, you have to use “(LayoutRoot.Opactiy)” as the argument, don’t miss out the blankets!

There has been many chances on the Storyboard since Silverlight 1. You will find a lot of “wrong” information from the Internet which can not work properly in beta 2.

// C#
Storyboard storyboard = new Storyboard();
DoubleAnimation doubleAnimatoin = new DoubleAnimation();
doubleAnimatoin.From = 1;
doubleAnimatoin.To = 0;
doubleAnimatoin.Duration = new Duration(new TimeSpan(0, 0, 3));
Storyboard.SetTarget(doubleAnimatoin, displayObject);
Storyboard.SetTargetProperty(doubleAnimatoin, new PropertyPath("(LayoutRoot.Opacity)"));

storyboard.Children.Add(doubleAnimatoin);
storyboard.Begin();
Sep 19

Carousel is a very hot effect among Flash and Silverlight. Although there are many readily available Carousel Class on the web, you may still want to explore the Mathematics behind. That is! Here is an example for your reference.

I will add a drill down effect to extend the functionality of the Carousel.

Vote for this sample

Flash is Better? (550 votes)
Silverlight is Better? (550 votes)

Comparison

Flash implementation: 20 minutes
Silverlight implementation: 40 minutes (Implemented First)
What’s the difference?

  • Development IDE: FDT - Flash Development Tools [AS3] vs Visual Studio 2008  [C#]

Source codes

Flash

Silverlight

Development IDE: FDT - Flash Development Tools [AS3] vs Visual Studio 2008  [C#]

Today, I am going to talk about my working environment.

If you are Flash Developer, I think you will understand that it’s completely impossible to use Flash 9 as your coding tool. You will just like working as if using Notepad. Anyway, I am currently using a Eclipse plug-in FDT as my primary Development Tool. The reason I choose this one is because it has a very good library management and also the code completion feature.

Of course, Flex also provide the same features. However, Flex is an extensive tool which always takes up a lot of computer resources. Hence, the speed is much slower.

image

For Silverlight, I think you don’t have much choice other than using Visual Studio 2008. But you may not know that I did not use Blend for creating any of the samples in this Blog. The reason is very simple. I still haven’t installed the Blend.

image027