Tag Archive for 'AIR'

Simple Screen Size Notification in AS3

I have made a small class that you can use if you would like to do something when your flash player is scaled to a maximum or minimum  size. I have seen this used before where if the user scaled the browser to less then 1024×768 the user was warned to scales their browser to the correct size.

I have also added the ability to ignore all out of bound events with a simple method call.

Download Zip here
http://gfxcomplex.com/blog/wp-content/uploads/2008/07/screensizenotification.zip

Source comes with completed example file.

Heres some example useage

import com.gfxcomplex.screen_management.ScreenSizeNotification;

var testing:ScreenSizeNotification = new ScreenSizeNotification();
testing.manageStage(stage, {minSizeW:550, minSizeH:400, maxSizeW:1000, maxSizeH:850});
testing.addEventListener(ScreenSizeNotification.SCREEN_LESS_THEN_MIN, tooSmall);
testing.addEventListener(ScreenSizeNotification.SCREEN_GREATER_THEN_MAX, tooBig);

function tooSmall(e:Event):void{
	trace("Too small");
}

function tooBig(e:Event):void{
	trace("Too Big");
}
//if needed to stop event dispatches use testing.ignoreEvents(true);

Adobe coming to st.Louis for the pre release of Flex and Air.

James Ward from Adobe will be in St. Louis and the flex and fuse the arch user group has been selected to host their stay! Adobe is providing food and beverages, a free copy of Flex 3 (to be fulfilled after Flex 3 launches) and maybe some Flex schwag! This is a unique opportunity to talk directly with Adobe and learn all about Flex 3. Please plan now to attend this very important meeting! Let’s show Adobe what St. Louis has to offer.

Date: Thursday, February 7, 2008
Location: The Drive Agency, 1617 Locust, St. Louis Missouri
Time: 6:00 PM
Topic: Adobe is visiting!
Speaker(s): James Ward, Adobe Platform Evangalist Team

Go to http://flexandfusethearch.com/ for more info.