getting FullScreen mode in Flex APP.

December 20, 2007

First thing here is that u have do is to mention the allowFullScreen property in the embed tag of ur Html page(wrapper), and set it to true.

allowFullScreen=”true”

and same thing in AC_FL_RunContent() method as

“allowFullScreen”, “true”

Now there is some code in the flex app we have to do.

1.import the required packages.

import flash.display.StageDisplayState;
import mx.managers.SystemManager;

2.Define a control on which u want to call the fullscreen option , here iam using button control.

<mx:Button label=”Alter-fullscreen” click=”toggleFullScreen()” x=”361″ y=”348″/>

3.Now define the function that mentioned in the button control to go to full screen.

private function toggleFullScreen():void

{
try
{
switch (systemManager.stage.displayState)
{
case StageDisplayState.FULL_SCREEN:
/* If already in full screen mode, switch to normal mode. */
systemManager.stage.displayState = StageDisplayState.NORMAL;
break;
default:
/* If not in full screen mode, switch to full screen mode. */
systemManager.stage.displayState = StageDisplayState.FULL_SCREEN;
break;
}
}

catch (err:SecurityError)
{
// ignore
}
}

Thats it, now when u click the button the window is set to fullscreen mode and viceversa.

Leave any comments for suggestions.fullscreen.jpeg this is how the fullscreen apperars.


Httpservice not refreshing : Cache control problem

December 20, 2007

The main point here is the Browser, Mozilla works, its creates new sessions and no cache problem, but when it comes to IE this problem persists, so simple solution is that we have to manually create sessions each time the script runs, and this is done by simply adding two lines of code in every PHP script page and those lines are given below.

<?php
session_start();
header(“Cache-control: private”);
?>

It will create a new session each time the script runs. Even when this won’t work put “no-store” in place of “private” in the header.Problem solved i guess.

Leave any comments for suggestions.


Bounce Effect to open and close combobox cox control.

December 20, 2007

Here we have to use a class Bounce and easing methods.

Before doing this import the needed package as below.

<mx:Script>
import mx.effects.easing.*;
</mx:Script>

Now we have to use the openEasingFunction ,closeEasingFunction , openDuration properties of the combobox to get our bounce effect.

<mx:ComboBox openEasingFunction=”{Bounce.easeOut}” openDuration=”1000″ closeEasingFunction=”{Bounce.easeIn}“></mx:ComboBox>

Now we have our bounce effect done,what r u waiting for try it.