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.

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;
}

Shares and Enjoy~

Did you like this post?

Subscribe here:  

14 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…

  9. Alan Says:

    Is it possible to build a true kiosk application with SL3 that will disable all but a configured special alt-key combination, thereby locking down the computer so even alt-tab will not work?

  10. Morteza Says:

    Silverlight is better and much quicker

  11. Einar Says:

    Flash one works fine..silverlight seems to have some display problems on FF (I’m using a Mac).

  12. Christian Says:

    I have a Mac and it works perfectly!

  13. Timothy Says:

    First, I tested with Silverlight 2 and Flash 10 in IE8; and I don’t see a different.
    Then, I tried in Firefox 3, Silverlight 2 works the same way; but Flash had some delay.
    Finally, I got the same result with Google Chrome as with Firefox 3, with the Flash delay.
    Both opened on the same monitor as the browser.

  14. Flash ve Silverlight karşılaştırması | AdobeHaber Says:

    [...] Flash Silverlight Download [...]

Leave a Reply