Let’s Join Mix 09 - 10K challenge!! Silverlight VS Flash: Snake Snacks Game
Jan 16

This is a new request made by M. Rajesh. He is interested in making accordion style image banner with some mouse interaction. He has given me some samples in Microsoft Homepage and Microsoft Window Server for references.

His idea (or Microsoft idea) is interesting and I have quickly implemented a sample for him. You may view the original image either by clicking or waiting for one second after mouse over on the image.

The effect is not as simple as I thought. To reduce the implementation time, I haven’t pay much attention on the coding style. I believe there are a lot of space for improving the coding. Is there anyone willing to help me to do so?

The images used in the application are provided by my friend Yuki Holland.

Comparison

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

  • Hand Cursor [AS3] vs [C#]

Source codes

Flash

Silverlight

Hand Cursor [AS3] vs [C#]

You may noticed that there is a hand cursor on both of the sample. This feature can be easily achieved.

// AS3
public function AccordionBanner() {
	this.buttonMode = true;
}

And for Silverlight

// C#
public AccordionBanner()
{
	InitializeComponent();
	this.Cursor = Cursors.Hand;
}

Shares and Enjoy~

Did you like this post?

Subscribe here:  

28 Responses to “Silverlight vs Flash: Accordion Banner”

  1. Shawn Wildermuth Says:

    The Silverlight Sample doesn’t work the same as the Flash sample for me. Is it purposeful? The Flash exampel slowly opens the panels (though it acts odd too), and the Silverlight example pops open the panels.

  2. Mino Says:

    The hand cursor in Flash is not working on Safari+MacOSX

  3. Uchimata Says:

    Flash doesn’t work on Firefox 3.0.5 + Vista64 as well.

  4. itmek Says:

    What does the InitializeComponent() function do and why do you need to call it?

  5. admin Says:

    itmek,

    it’s a predefined method for mapping all the ui element in the xaml into local variables. You may not use it, but then you have to always use something like

    Canvas canvas = this.FindName(”LayoutRoot”) as Canvas;

  6. Silverlight Cream for January 17, 2009 -- #488 Says:

    [...] working on for the MIX 10K challenge. This is fun… didn’t get very far, only 5, but it is clever. Silverlight vs Flash: Accordion Banner Terence Tsang has an accordion banner up this time, in response to a reader request. I’m going to [...]

  7. marshall Says:

    As3 code should look like this

    this.mouseChildren=false; {}
    this.buttonMode = true;
    this.useHandCursor=true;

  8. Ht Says:

    Is there any specific license attached to this project?

  9. johnsontroye Says:

    That is very cool. Nice work.

  10. chenxiaohui Says:

    太棒了!

  11. ebsolut.com Says:

    one of the things that is noticably different is the picture quality difference between the two shows… I feel that the Silverlight APP has the edge…

  12. ebsolut.com Says:

    maybe just to qualify that previous comment… you should look closely at the text around the fish for blurring on the flash image…

  13. Silverlight Travel » Silverlight vs Flash: Accordion Banner Says:

    [...] from Shine Draw [...]

  14. Dave Says:

    How about pulling image from a database….

    I’ve got a neat little rotating banner with numerical hotspots below to allow for jumping to a particular image/promotion but I have’nt seen anything where the image loads from a database.

    I’d like selected users to be able to upload images into the database so that they can create their own promo rotating banners.

  15. Anas Marwan Says:

    The same thing i’m repeating it over and over again, most of the comparisons i have seen till now lacks to the unifying the frame rate, here flash has a default frame rate of (24 fps) but silverlight has a default of (60 fps), and that is not a way to make a comparison between them, you have to put them at the same level of frame rate to see how do they work…
    if the silverlight renders better in its default frame rate, that doesn’t make it better !

  16. Jake Says:

    Another problem with this comparison besides the one Anas is talking about. ebsolut.com said there’s difference in image quality. That’s because the author of the Flash piece set his image compression set too high on the images. This takes about 2 seconds to set. Then, the image quality can be as high or low as you want it to be. They should be set to the same settings as SL is using to compare correctly.

  17. Tony Says:

    Flash’s image is resized simultaneously as the accordion is moving into place. The Silverlight example’s image does not resize at all. Maybe this is why the image quality suffers compared to the silverlight example. Also, I don’t have the hand cursor on flash example. I’m sure silverlight can achieve the image resizing if done correctly. So it’s pretty much evened up for me.

  18. Miku Says:

    How can you add more images to this project, simply adding and ‘image4′ in al the code ( copy pasting and replacing the numbers with a 4 instead of a 3 does not work!

  19. Eric Says:

    this could work
    //AS3
    public function AccordionBanner():void
    {
    Mouse.cursor = MouseCursor.BUTTON;
    }

  20. รับทำเว็บไซต์ Says:

    I love this.

    very cute.

  21. Lopsang Sherpa Says:

    Nice banner

  22. Solar Panel for Homes Says:

    nice blog, like the simple theme for this site. excellent job!

  23. Imelda Says:

    Hi, i think that i saw you visited my weblog so i came to “return the favor”.I’m trying to find things to enhance my website!I suppose its ok to use some of your ideas!! my website is about bobcat tractors. would like some feedback if possible

  24. Diseño tiendas online Says:

    Sumamente practico para tomarlo como base. Buen trabajo :)

  25. Sexshop Says:

    I would like to have it in my site. :)

  26. CC Says:

    I don’t believe that Silverlight need 1 hour and 10 minutes to make this sample. For me it seems that can be done for 15 minutes with Blend?

  27. Alquiler herramientas Says:

    Very nice banner, dinamic and funtional.

  28. effect and affect Says:

    A person necessarily help to make severely articles I’d state. That is the first time I frequented your web page and up to now? I amazed with the analysis you made to create this actual submit incredible. Magnificent job!

Leave a Reply