Subscribe to RSS
get email updates
home | about | pixDif AIR app | video tutorials
polyGeek.com

Register for 360Flex in DC using the ad below and you will automatically be entered in a drawing for a free ticket. Read more.
place your ad here

Web Premium





Changing displayState and listening for fullScreen events

October 15th, 2008 . by polygeek

The Flex snippet below listens for fullscreen events so that you can react and change layout, or whatever, when changing screen modes. One subtle tidbit to remember is that to set up the listeners you have to wait for applicationComplete. If you use creationComplete you’ll get a runtime error.

view source

Note: I got most of this code off of some other tutorial and modified it. Now I don’t know where the source came from. If it’s you then please comment so that I can give you some credit.

Addendum: In the comments Jared was nice enough to point out the entry at FlexExamples.com that was the inspiration for this post.

If something here has proved valuable to you then feel free to drop a couple of bucks in the tip-jar.

Post to Twitter Post to Delicious Post to Facebook Post to Reddit Post to StumbleUpon


similar posts

Reading FlashVars in Flex

October 14th, 2008 . by polygeek

To read the value of a FlashVar(s) use the following in your creationComplete handler.

_myNumber = Application.application.parameters.myNumber;

And the Javascript snippet would look like this if you using the default AC_FL_RunContent method.

"FlashVars", "myNumber=123",

Or for multiple variables:

"FlashVars", "myNumber=124&myString=polyGeek",

And if you’re using SWFObject then the Javascript would look something like this:


<script type="text/javascript">
var flashvars = {
myNumber: "123.456",
myString: "polyGeek" };


swfobject.embedSWF( '${application}.swf',
'${application}_div',
'${width}', '${height}',
'9.0.45',
'expressinstall.swf',
flashvars,
{bgcolor: '#ffffff', menu: 'false'}, {id: '${application}'});
</script>

More info about SWFObject at GoogleCode.

If something here has proved valuable to you then feel free to drop a couple of bucks in the tip-jar.

Post to Twitter Post to Delicious Post to Facebook Post to Reddit Post to StumbleUpon


similar posts

   



polyGeek.com

© Copyright 2008 polyGeek.com / Dan Florio, All Rights Reserved Except Where Explicitly Stated
Web Developement Blogs - Blog Catalog Blog Directory
M2 Websites
Local Directory for Los Angeles, CA

Better Tag Cloud