28Апр/101
UINativeWindow
package ru.kozlovskij.air { import flash.display.DisplayObject; import flash.display.DisplayObjectContainer; import flash.display.NativeWindow; import flash.display.NativeWindowInitOptions; import flash.events.Event; import mx.core.IUIComponent; import mx.events.FlexEvent; import mx.managers.WindowedSystemManager; /** * Composition of <code>NativeWindow</code> and <code>IUIComponent</code>. * * @author Aleksandr.Kozlovskiy */ public class UINativeWindow extends NativeWindow { protected var systemManager:WindowedSystemManager; protected var childDisplayObject:IUIComponent; protected var rootDisplayObject:IUIComponent; /** * After initialization <code>childDisplayObject</code> added to <code>systemManager</code>'s displaylist. * * * @param initOptions:NativeWindowInitOptions - Analogically NativeWindow initOptions. * @param rootDisplayObject:IUIComponent - Root Application or other IUIComponent implementation. Mast extends DisplayObject. * @param childDisplayObject:IUIComponent - Container. Child Application or other IUIComponent implementation. Mast extends DisplayObject. * */ public function UINativeWindow(initOptions:NativeWindowInitOptions, rootDisplayObject:IUIComponent, childDisplayObject:IUIComponent) { super(initOptions); this.rootDisplayObject = rootDisplayObject; this.childDisplayObject = childDisplayObject; addChildren(); stage.addEventListener(Event.RESIZE, stageResizeHandler); } protected function addChildren():void { childDisplayObject.addEventListener(FlexEvent.CREATION_COMPLETE, childCreationCompleteHandler, false, 0, true); (stage.addChild(systemManager = new WindowedSystemManager(rootDisplayObject)) as DisplayObjectContainer) .addChild(childDisplayObject as DisplayObject); stageResizeHandler(); } protected function childCreationCompleteHandler(e:FlexEvent):void { childDisplayObject.removeEventListener(FlexEvent.CREATION_COMPLETE, childCreationCompleteHandler); stageResizeHandler(); } // ------------------ resize ----------------------- // protected function stageResizeHandler(e:Event = null):void { childDisplayObject.width = stage.stageWidth; childDisplayObject.height = stage.stageHeight; } } }
23Дек/090
Package Assistant (public alpha)
Serge Jespers опубликовал Package Assistant, о котором писал ранее.
Текущая версия: "public alpha".
Скачать можно тут (.dmg).
Это AIR2-приложение представляет из себя некоего "помощника" для сборки приложений с нативными (встроенными) инсталяторами. Эти самые инсталяторы - есть одна из фич AIR2.
Так вот, чтобы воспользоваться этой вкусняжкой, приходилось иметь дело с ADT (command line compiler) , что не очень удобно. А Package Assistant дает нам UI к компилятору.
Вот, что пишет сам автор:
The wizard style application allows you to easily identify the files it needs and after just 4 steps you simply
hit the compile button. A lot easier than fiddling around with the command line![]()
Можно посмотреть скринкаст (недельной давности).
RAFPUG
UAFPUG
