|
|
|
[
Permlink
| « Hide
]
Larry McLister - [09/07/07 01:16 PM ]
QRB deferred for moxie. I believe there is a work around that involves adding the swcs tot eh lib path and there are probably only a handful of people (if that) that would use this workflow.
s k, the workaround is quite simple in fact:
- create a new flex project - choose Desktop Application (runs in Adobe AIR) - press Next, next - on the screen with two tabs ("Source path" and "Library path") there are three text input boxes lower : "main source folder", "main application file" and "application id". - change the extension on the "main application file" from .mxml to .as - Voila! thanks laurentiu, but this is the workflow i have tried previously with no success. When I try to run the application nothing happens, when i try to debug it i get:
Process terminated without establishing connection to debugger. Command: "C:\Program Files\Adobe\Flex Builder 3\sdks\3.0.0\bin\adl.exe" "[path to project]\bin-debug\[name of app].xml" "[path to project]\bin-debug" Output from command: invocation forwarded to primary instance my FlexBuilder version is 3.0.194161. I am trying to get info of which specific SWCs might need to be included nothing happens probably because unlike the Flex AIR project, the AS AIR project doesn't create the windows automatically. it took me a while to figure that out when i first did it, but now all i'm doing to create an AS AIR project is just the steps enumerated there.
Of course after the project is created i add code to create the windows and stuff, but that wasn't the issue, so i involuntarily ommited that. :) try something like: var options:NativeWindowInitOptions = new NativeWindowInitOptions(); //options.systemChrome = "none"; //options.transparent = true; var mainWindow:NativeWindow = new NativeWindow(options); mainWindow.activate(); and you add content to that window throught mainWindow.stage. :) hope that helps and I have the same Flex Builder version, so that's also shouldn't be the issue :)
thanks a million for the info, tried it and am still getting nothing when building / errors when debugging. Heres the class:
package { import flash.display.NativeWindow; import flash.display.NativeWindowInitOptions; import flash.display.NativeWindowSystemChrome; import flash.display.Shape; import flash.display.Sprite; public class AS3AIRTest extends Sprite { public function AS3AIRTest() { var options:NativeWindowInitOptions = new NativeWindowInitOptions(); var mainWindow:NativeWindow = new NativeWindow(options); mainWindow.activate(); var shp:Shape = new Shape(); shp.graphics.beginFill(0x0000FF); shp.graphics.drawRect(0,0,100,100); shp.graphics.endFill(); mainWindow.stage.addChild(shp); } } } Well, that is strange indeed. Because i just created a new proj, copy-pasted your code and it works. No swc's added, no nothing.
Try uninstalling flex, cleaning up folders, registry, and then reinstalling it again. There's surely some other problem with your Flex Builder. Update on this issue: I tried the above code on my Mac home computer (not work PC) and found it worked! They both have exactly the same Flex Builder version.
I think we can all agree that having the option to create ActionScript AIR projects from the wizard would not be 'only used by a handful of people'. I've just run into the same problem, no AS AIR project option. I sure hope this gets fixed.
It's weird this feature isn't available. Flex is an excellent Actionscript 3 IDE and compiler. Would love to see this fixed.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||