Monday, December 29, 2008
Monitoring System Idle State in AIR
Please look this code:
NativeApplication.nativeApplication.idleThreshold = 120;
NativeApplication.nativeApplication.addEventListener(Event.USER_IDLE, idlefunction(event:Event) {trace("Idle");} );
NativeApplication.nativeApplication.addEventListener(Event.USER_PRESENT, presentfunction(event:Event) { trace("Present");} );
Note:
Using the idleThreshold property, the specified interval( in seconds) are set, The system is reaching the idle state, upto specified seconds, Event.USER_IDLE is fired and any interrupt to the system (keyboard, mouse or input devices) is done, Event.USER_PRESENT is fired. Its very helpful to screen saver samples.
Finding Screen Resolutions in AIR
Using the capabilities , we can find the current screen resolutions ,As per the simple code, listed below :
desktopWidth = Capabilities.screenResolutionX;
desktopheight = Capabilities.screenResolutionY;
The screenResolutionX is defines the screen width and screenResolutionY is defines the screen height.
desktopWidth = Capabilities.screenResolutionX;
desktopheight = Capabilities.screenResolutionY;
The screenResolutionX is defines the screen width and screenResolutionY is defines the screen height.
Wednesday, December 17, 2008
Skinning for Horizontal & Vertical Scroll Bars
The belowed code shows the skinning effects for both horizontal and vertical scrollbars.
.scrollskin
{
upArrowUpSkin: Embed("../assets/Up_Arrow.png");
upArrowOverSkin: Embed("../assets/Up_Arrow.png");
upArrowDownSkin: Embed("../assets/Up_Arrow.png");
downArrowDownSkin: Embed("../assets/Down_Arrow.png");
downArrowUpSkin: Embed("../assets/Down_Arrow.png");
downArrowOverSkin: Embed("../assets/Down_Arrow.png");
trackSkin: Embed("../assets/Bar.png");
thumbUpSkin:Embed("../assets/Scroll.png");
thumbDownSkin:Embed("../assets/Scroll.png");
thumbOverSkin :Embed("../assets/Scroll.png");
}
Tuesday, September 23, 2008
AIR Browser
The Adobe Integrated Runtime (AIR) uses the Webkit HTML engine. As such, most of the complexity of using HTML in your applications is hidden. This simple steps, helps to load a webpage . And it does not allow pop-up windows at the time of browsing .
The HTML components with their proeprties as like below:
mx:HTML location="http://www.t-mobile.com" locationChange="chgHtml()" width="800" height="600" styleName="dispHtml" id="dispHtml" x="112" y="13"
And having a properties to access the browser histroys, to go back & forward in the browser, the few important proerties are:
To Go Back from the current page : dispHtml.historyBack()
To Go Forward the current page : dispHtml.historyForward()
To Stop the loading of current page : dispHtml.cancelLoad()
To Refresh the current page : dispHtml.reload()
Try with these informations, to create your own browser.
Few Steps to create FullScreen AIR Application
In AIR, We have a properties to create a application in full screen mode (without titlebar). Please follow the steps to create in your project.
1.) Open the projectname- app.xml file in the src folder, Add the "none" to the systemChrome
tag & Add the "false" to the transparent tag.
2.) Open the main application mxml file and add the propety called showFlexChrome="false"
to the main tag called.
mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" showFlexChrome="false" backgroundColor="white" alwaysInFront="true"
1.) Open the projectname- app.xml file in the src folder, Add the "none" to the systemChrome
2.) Open the main application mxml file and add the propety called showFlexChrome="false"
to the main tag called
mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" showFlexChrome="false" backgroundColor="white" alwaysInFront="true"
Adobe AIR (Flex 3.0)
Adobe AIR is a new runtime in development by Adobe and we are very close to releasing Adobe AIR 1.0. AIR allows you to write desktop software that runs on 3 operating systems (MAC,WIN,LINUX) with the same file. This allows your application to be a true desktop application rather then just a website and allows you to do much more than the web allows today. AIR applications are real native desktop applications and provide APIs for writing files, drag-drop, system notifications, network detection, and more. AIR empowers developers to write desktop software that leverages the Internet.
What is Flex ?
At the heart of Flex is the ability to create SWF files that run in Adobe Flash Player. Distill all the features down and really it is a development paradigm that compiles to SWF. It really is that simple but often we make the definition much harder. Just like Flash can create SWF files, so can Flex but the way you develop is completely different.
Subscribe to:
Posts (Atom)