Thursday, 18 February 2010

True Full Screen in Flash Player 7 or 8

Most flash based video players have a "full screen" option that makes the video fill your screen even if it originated from a small square in a web page.

But it can be used to make any SWF file fill the screen.

I use both MX 2004 or CS3 depending on which computer I am using. And I know there are still a lot of MX or 8 users out there. So, in case I forget, and in case anyone else finds it helpful, here's how you do full screen in MX 2004 or 8.

The whole thing is summed up in detail here:
http://www.adobe.com/devnet/flashplayer/articles/full_screen_mode.html

The ActionScript

Here is my AS2 implementation:

/*first set the initial fullscreen value which is 0 because we are not yet in fullscreen */
var fullscr_status = 0;
/*Then a function that runs when the fullscreen button is pressed, this tests whether we are in fullscreen (1) or not (0). If not we go into fullscreen mode. If allready in fullscreen mode we come out of it. */
_root.button_btn.onRelease = function() {
if (fullscr_status == 0) {
//Fullscreen on
fullscr_status = 1;
Stage["displayState"] = "fullScreen";
} else if (fullscr_status == 1) {
//Fullscreen off
fullscr_status = 0;
Stage["displayState"] = "normal";
}
};

The thing that is different for MX 2004 and 8, when compared to using ActionScript 2 in CS3 is this:

Stage["displayState"] = "fullScreen";

and

Stage["displayState"] = "normal";

these are different in CS3.

The HTML

The fullscreen ActionScript won't have any effect unless the object and embed parameters are set to allow fullscreen as follows:

For object:

param name="allowFullScreen" value="true"


For embed:

allowFullScreen="true"


The HTML object and embed I use is described on the Adobe site here:
http://www.adobe.com/devnet/flashplayer/articles/full_screen_mode_04.html

An Example

Just click the square.





Wednesday, 10 February 2010

Design Out Crime

I received an email today from the Design Council and was immediately interested in an article about using design to cut crime. For me this is exactly what design is about, that is solving real world problems. As Ivan Chermayeff would encourage me to think - these solutions should come out of an understanding of the problem.

So what was the article about? Beer glasses, that don't break, or if they do, cause less damage to people - we are talking about cutting down incidence and opportunity for 'glassing' attacks.

That means designing something that has some aesthetic value, a practical use, and limited abuse.

Read the full article here:

http://www.designcouncil.org.uk/Design-Council/Files/Landing-pages/Design-Out-Crime/Alcohol-related-crime/?id=5335&WT.dcsvid=NDA5OTYwNDIwOAS2&WT.mc_id=

And you can watch a video about it below:


Designing the next generation British pint glass - the design story from Design Council on Vimeo.