Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Desktop, Mobile and non-browser Environments > AIR (Apollo)

Reply
 
Thread Tools Rating: Thread Rating: 1 votes, 5.00 average. Display Modes
Old 09-18-2007, 07:14 PM   #1
gyzhor
Member
 
Join Date: Jun 2006
Posts: 32
Default Using the AIR Flash CS3 Update

I'm pretty good at AS2, and just now learning AS3, but I'm super excited about working in AIR. I don't have Flex (which I've really only damped my hands with anyways), so I was ecstatic when Adobe released the the Flash CS3 update allowing me to package AIR straight out of my FLA.

I'm having trouble, though, figuring out how to get some common application functionality to work - drag and drop the transparent window, "always on top", etc. - that are comparatively easy to accomplish in Flex.

I've poked about and most turorials and bloggers' focus still seem entirely Flex oriented. Does anyone have any ideas how to accomplish these functions? Exporting from Dreamweaver? Include an mxml in the AIR package? Cross-format APIs? Actionscripts? Beuller?

Thanks in advance for any advice!
~gyz
gyzhor is offline   Reply With Quote
Old 09-18-2007, 07:23 PM   #2
senocular
six eyes
 
senocular's Avatar
 
Join Date: Jan 2003
Location: San Francisco, CA (USA)
Posts: 7,758
Send a message via ICQ to senocular Send a message via AIM to senocular Send a message via MSN to senocular Send a message via Yahoo to senocular
Default

What are you looking for exactly? Do you want to see a Flash CS3 example of drag and drop?
__________________
(6)
senocular is offline   Reply With Quote
Old 09-18-2007, 07:43 PM   #3
gyzhor
Member
 
Join Date: Jun 2006
Posts: 32
Default

Of a transparent-windowed AIR application, yeah.
Right now, the Flash CS3 Package settings give you the option for a custom chrome (transparent), but nothing for draggable windows or "always on top" options, as you could otherwise define in a Flex mxml script, ie:

Quote:
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" mouseDown="stage.window.startMove()" layout="absolute" width="750" height="550" backgroundGradientAlphas="[0.0, 0.0]" alpha="1.0" backgroundAlpha="0">
Like I said, I'm still brand-spanking-new to AS3, so maybe it's just a matter of finding out how to include "stage.window.startMove()" in an actionscript mousedown, but a lot of what I've read leads me to think there's some external file that needs to be included.

Am I way off?

And thanks, Senocular, for helping me out for the second time in as many weeks!
gyzhor is offline   Reply With Quote
Old 09-18-2007, 07:52 PM   #4
senocular
six eyes
 
senocular's Avatar
 
Join Date: Jan 2003
Location: San Francisco, CA (USA)
Posts: 7,758
Send a message via ICQ to senocular Send a message via AIM to senocular Send a message via MSN to senocular Send a message via Yahoo to senocular
Default

The Flash settings for AIR are, I think, a little limited. But they consist only of an interface to modify the actuall XML file that will ultimately be used to control your application. You can edit that by hand by finding it in the same folder as your FLA (FLA name + -app.xml).

Similarly, other actions in Flex specific to AIR will also exist in Flash since they are using the same player. stage.window.startMove() for example is the same in Flash. You just need to connect it to an event.

ActionScript Code:
stage.addEventListener(MouseEvent.MOUSE_DOWN, moveWindow); function moveWindow(event:MouseEvent):void {     stage.window.startMove(); }
__________________
(6)
senocular is offline   Reply With Quote
Old 09-18-2007, 08:03 PM   #5
gyzhor
Member
 
Join Date: Jun 2006
Posts: 32
Default

And that did it alright. It's always a little embarassing when the answer is something I really should have known already.

Thanks!

I'll experiment with the XML to see if I can get the "always on top" to work ... unless you know a script for that too.
gyzhor is offline   Reply With Quote
Old 09-18-2007, 08:05 PM   #6
senocular
six eyes
 
senocular's Avatar
 
Join Date: Jan 2003
Location: San Francisco, CA (USA)
Posts: 7,758
Send a message via ICQ to senocular Send a message via AIM to senocular Send a message via MSN to senocular Send a message via Yahoo to senocular
Default

http://livedocs.adobe.com/labs/flex/...#alwaysInFront
__________________
(6)
senocular is offline   Reply With Quote
Old 09-18-2007, 08:14 PM   #7
gyzhor
Member
 
Join Date: Jun 2006
Posts: 32
Default

Awesome. Thanks!
gyzhor is offline   Reply With Quote
Old 11-28-2007, 09:25 PM   #8
SirDuke
Geek Apprentice
 
SirDuke's Avatar
 
Join Date: Jun 2007
Location: Greece
Posts: 148
Default

why does this line of code give me a compile-time error?
Code:
stage.window.startMove();
saying "Access of possibly undefined property window..." ?

Did something change from AIR CS3 plug-in beta1 to beta2?
You seem to be easily using it here and i also saw it working on a tutorial at gotoandlearn.com. Anyone has any ideas?
SirDuke is offline   Reply With Quote
Old 11-29-2007, 01:46 PM   #9
xwielder
Senior Member
 
Join Date: Aug 2007
Location: NE Ohio
Posts: 524
Send a message via AIM to xwielder
Default

stage.Window

to

stage.nativeWindow
xwielder is offline   Reply With Quote
Old 11-30-2007, 09:05 PM   #10
SirDuke
Geek Apprentice
 
SirDuke's Avatar
 
Join Date: Jun 2007
Location: Greece
Posts: 148
Default

that it! thanx alot
SirDuke is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
one template, many looks? subquark ActionScript 1.0 (and below) 1161 09-03-2009 04:45 PM
Optimizing Flash Web Sites for Search Engines rockcoastmedia General Chat 20 03-29-2009 10:31 PM
Backwards Compatability Issues with Flash Remoting and CS3 dannyst ActionScript 3.0 0 08-28-2007 12:56 AM
Flash Encrypt 1.2 Released. SIntrix General Chat 14 04-21-2005 10:02 PM
[Q] Do we need those forums??? CyanBlue General Chat 59 07-27-2004 12:13 PM


All times are GMT. The time now is 08:08 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.
You Rated this Thread: