Wednesday, November 4, 2009
Tuesday, January 6, 2009
Pesky Cursor
I used Flex 3 to build a fullscreen air app that runs when the computer boots. It was made specifically for looping presentations or video so it's imperative that the mouse cursor stays hidden as it looks tacky otherwise. The program works flawlessly when launched from within the operating system (Windows XP, Vista and OS X(10.5)).
Problem?
When launched automatically on bootup in OS X, the cursor is showing! Very pesky. It seems OS X steals focus away from the application so the measures taken to hide the mouse cursor are rendered useless until someone moves the mouse or clicks on the screen.
Solution!
Your application needs focus. It deserves it afterall, it's awesome.
this.alwaysInFront = true;
this.focusEnabled = true;
this.nativeWindow.orderToBack();
this.nativeWindow.orderToFront();
this.addEventListener(MouseEvent.MOUSE_OVER, hideMouse);
function hideMouse(e:MouseEvent):void
{
Mouse.hide();
}
Problem?
When launched automatically on bootup in OS X, the cursor is showing! Very pesky. It seems OS X steals focus away from the application so the measures taken to hide the mouse cursor are rendered useless until someone moves the mouse or clicks on the screen.
Solution!
Your application needs focus. It deserves it afterall, it's awesome.
this.alwaysInFront = true;
this.focusEnabled = true;
this.nativeWindow.orderToBack();
this.nativeWindow.orderToFront();
this.addEventListener(MouseEvent.MOUSE_OVER, hideMouse);
function hideMouse(e:MouseEvent):void
{
Mouse.hide();
}
Tuesday, October 14, 2008
Tuesday, October 7, 2008
code beautifiers
i'm on the hunt for a good code beautifier. i found http://pluszone.net/blog/projects/beautifierPlus/index.php on the google machine, but i trust something a little more beautiful is available out there. still hunting!
before:
public var geeky:Action = new Action();
private static function beautifyCode(code:Action):String
{
/* all code and no beauty make
jeremy something something */
return var beautifulCode:String = "pixie dust";
}
after:
before:
public var geeky:Action = new Action();
private static function beautifyCode(code:Action):String
{
/* all code and no beauty make
jeremy something something */
return var beautifulCode:String = "pixie dust";
}
after:
public var geeky:Action = new Action();
private static function beautifyCode(code:Action):String
{
/* all code and no beauty make
jeremy something something */
return var beautifulCode:String = "pixie dust";
}
Subscribe to:
Posts (Atom)






