-
1. Re: How to set window chrome
Shunshifuw Apr 11, 2010 9:11 PM (in response to Shunshifuw)oops, I guess I don't know how to insert code either.
<html>
<head>
<title>Break Pal - Fitness at Your Desk</title>
<link href="sample.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="lib/air/AIRAliases.js"></script>
<script src="lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
// AIR-related functions created by the developer
// reads the content of a local text file
function openInBrowser(url) {
air.navigateToURL( new air.URLRequest(url));
}
function doLoad10sec()
{
document.getElementById( 'window10' ).addEventListener( 'click', doWindow10sec );
}function doWindow10sec()
{
var init = new air.NativeWindowInitOptions();
var bounds = null;
var win = null;
var login = air.File.applicationDirectory.resolvePath( '10sec_timer.html' );bounds = new air.Rectangle( ( air.Capabilities.screenResolutionX - 325 ) / 2, ( air.Capabilities.screenResolutionY - 145 ) / 2, 325, 145 );
init.minimizable = false;
init.maximizable = false;
init.resizable = false;
init.transparent = true;
win = air.HTMLLoader.createRootWindow( true, init, false, bounds );
win.load( new air.URLRequest( login.url ) );
}function doLoad20sec()
{
document.getElementById( 'window20' ).addEventListener( 'click', doWindow20sec );
}function doWindow20sec()
{
var init = new air.NativeWindowInitOptions();
var bounds = null;
var win = null;
var login = air.File.applicationDirectory.resolvePath( '20sec_timer.html' );bounds = new air.Rectangle( ( air.Capabilities.screenResolutionX - 325 ) / 2, ( air.Capabilities.screenResolutionY - 145 ) / 2, 325, 145 );
init.minimizable = false;
init.maximizable = false;
init.resizable = false;
win = air.HTMLLoader.createRootWindow( true, init, false, bounds );
win.load( new air.URLRequest( login.url ) );
}
</script>
</head><body onLoad="doLoad10sec(); doLoad20sec();">
<h3>Break Pal - Fitness at Your Desk</h3>
<input id="window10" type="button" value="window1" />
<input id="window20" type="button" value="window2" /><a href="#" onclick="openInBrowser('http://www.adobe.com/go/airhtmlsecurityfaq');">http://www.adobe.com/go/airhtmlsecurityfaq</a>.
<a href="#" onclick="clearwindow();">clearwindow</a>
</body>
</html> -
2. Re: How to set window chrome
Shunshifuw Apr 11, 2010 9:14 PM (in response to Shunshifuw)By the way what I'm trying to do is rebuild the widget from here
Break Pal - Workplace Wellness
it was built on a yahoo widget which is just not doing the job.
Any coders here want a membership just let me know and I'll set you up. Keep you in shape while your coding
Phil
-
3. Re: How to set window chrome
Joe ... Ward Apr 12, 2010 1:28 PM (in response to Shunshifuw)In the NativeWindowInitOptions object you use to create the transparent windows, set the systemChrome property to air.NativeWindowSystemChrome.NONE.
-
4. Re: How to set window chrome
Shunshifuw Apr 12, 2010 1:52 PM (in response to Shunshifuw)That's what I attempted to do. Kept getting an error saying can't find variable none
I must be doing it wrong.
Phil
-
5. Re: How to set window chrome
Joe ... Ward Apr 12, 2010 2:02 PM (in response to Shunshifuw)Try either window.runtime.flash.display.NativeWindowSystemChrome.NONE or simply "none".
-
6. Re: How to set window chrome
Shunshifuw Apr 19, 2010 1:55 PM (in response to Joe ... Ward)Thank You. It's working now.
Finally starting to get familiar with air


