Flash vs Silverlight: Spiral Text Silverlight vs Flash: Plummet Rotator
Oct 07

It’s not difficult to make a full screen application. But the sample below can save you a lot of time to look around a reference from the Internet.

Vote for this sample

Flash is Better? (96 votes)
Silverlight is Better! (138 votes)

Comparison

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

  • stage.displayState[AS3] vs Application.Current.Host.Content.IsFullScreen [C#]

Source codes

Flash

Silverlight

Full Screen: stage.displayState[AS3] vs Application.Current.Host.Content.IsFullScreen [C#]

Switching to Full Screen Mode is very easy. Here is a simple demonstration.

// AS3
stage.displayState = ( stage.displayState  == StageDisplayState.FULL_SCREEN)
	? StageDisplayState.NORMAL : StageDisplayState.FULL_SCREEN;
stage.addEventListener(FullScreenEvent.FULL_SCREEN, on_full_screen);

private function on_full_screen(e : FullScreenEvent):void{
	// get the full screen dimension
	var screenWidth:Number = stage.stageWidth;
	var screenHeight:Number = stage.stageHeight;
}

Code in C# is similar to than in AS3. It’s pretty straight forward. I don’t describe too much this time.

// C#
Application.Current.Host.Content.IsFullScreen = !Application.Current.Host.Content.IsFullScreen;
Application.Current.Host.Content.FullScreenChanged += new EventHandler(Content_FullScreenChanged);

void Content_FullScreenChanged(object sender, EventArgs e)
{
	// get the full screen dimension
	double screenWidth = Application.Current.Host.Content.ActualWidth;
	double screenHeight= Application.Current.Host.Content.ActualHeight;
}

Random Posts

8 Responses to “Silverlight vs Flash: Switching to Full Screen”

  1. Matt Says:

    The Silverlight version doesn’t work for me in Firefox (works fine in IE). But I guess it must just be me since Silverlight is winning in the votes?

  2. Hoc Says:

    Silverlight does not work in Firefox for Full Screen. I confirmed!

  3. Mina Says:

    Full Screen Silverlight works greatly on my Firefox

  4. Nikola Says:

    of course that silverlight works, just as flash does…

  5. Photon Says:

    The Silverlight version seems to be A LOT faster and responsive when I click to full screen!

  6. admin Says:

    Thanks for posting the testing result. I only got Firefox 2 installed and Silverlight is not working on it. I even don’t have any chance to see whether it is working or not. haha.

  7. Herman Says:

    The Silverlight one doesn’t work for me as well in Firefox 3

  8. TekJ Says:

    The Flash one is faster for me. Plus it makes more sense as it correctly uses the correct current monitor in dual monitor environments. The Flash one opens fullscreen on the same monitor as your browser window happens to be on, while the Silverlight example opens on the main screen 1 only. I’m not sure if this is your implementation or a limitation of Silverlight’s player…

Leave a Reply