Software As She’s Developed

Mahemoff’s Podcast/Blog – Web, Programming, Usability from the Author of ‘Ajax Design Patterns’ (AjaxPatterns.org)

Software As She’s Developed header image 2

Drag a custom window with Adobe Air

July 29th, 2007 · 9 Comments · SoftwareDev

Quick tip. Been playing with Adobe Air recently and was trying to let the user drag a "systemChrome="none" transparent="true" around. The definitive Air reference has an example that shows how to close and minimize, but not how to move it. And all the examples I could find are Flash-based rather than the HTML/JS/Ajax approach I'm taking (along with some forum posters who were as confused as I was). Based on the Flash examples and the close/minimise pattern, it turned out to be this simple:

JAVASCRIPT:
  1. document.body.onmousedown =
  2.         function() { window.htmlControl.stage.window.startMove(); }


Tags: ··

9 Comments so far ↓

Leave a Comment