LAZIOMATICA – Guida allo Sviluppo Software

La nuova forma del software su misura…

 

AIR 1.5 – hiding the mouse cursor

To hide the mouse in your AIR app, you can insert once this on your applicaion init script:

Mouse.hide();

Sometimes, even though the documentation says that it’s possible,this if this wasnt’t able to hide the mouse cursor so you can try this workaround:

stage.nativeWindow.activate();
stage.nativeWindow.orderToBack();
stage.nativeWindow.orderToFront();
Mouse.hide();

We notice that on OSX, mouse.hise() fail to work in fullscreen interactive until was clicked somewhere on the stage, so You can raise a click, just before the Mouse.hide(), with :

dispatchEvent( new MouseEvent( MouseEvent.CLICK ) );

Filed under : Actionscript 3,AIR,Flex,Flexbuilder,RIA
By admin
On 12 luglio 2009
At 10:50
Comments : 0
 
 

How do I make an AIR Window be always on top?

The WindowsApplication mxml tag has an alwaysInFront property, so to make an application  always stay on top, just do this:

<?xml version=“1.0″ encoding=“utf-8″?>
<mx:WindowedApplication xmlns:mx=“http://www.adobe.com/2006/mxml” layout=“absolute” alwaysInFront=“true”>
</mx:WindowedApplication>

If you want an AIR  app to run in Kiosk mode application, that is  using alwaysInFront with a full screen, make it doing this:


<?xml version=“1.0″ encoding=“utf-8″?>
<mx:WindowedApplication xmlns:mx=“http://www.adobe.com/2006/mxml” layout=“absolute” alwaysInFront=“true”
applicationComplete=“onApplicationComplete()”>


<mx:Script><![CDATA[

public function onApplicationComplete():void{
this.stage.displayState = StageDisplayState.FULL_SCREEN;}

]]></mx:Script>
</mx:WindowedApplication>

Filed under : Actionscript 3,AIR,Flex,Flexbuilder,RIA
By admin
On
At 10:18
Comments : 0