Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to start Application from a simple AS file?
    primarykey
    data
    text
    <p>I want to use vkontakte's new wrapper feature, that enhances your application abilities by running under SWF wrapper. </p> <p>This is a <a href="http://vkontakte.ru/source/ExampleWrapped.zip" rel="nofollow noreferrer">sample application</a> that uses this mechanism. It uses pure action script to display it's contents rather than an <code>mx:Application</code>.</p> <p>Using the wrapper on my <code>mx:Application</code> failed due to the following error:</p> <pre><code>TypeError: Error #1009: Cannot access a property or method of a null object reference. at mx.managers::FocusManager/activate()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\managers\FocusManager.as:702] at mx.managers::SystemManager/activateForm()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\managers\SystemManager.as:2493] at mx.managers::SystemManager/activate()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\managers\SystemManager.as:2451] at mx.core::Application/initManagers()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Application.as:1152] at mx.core::Application/initialize()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Application.as:834] at DummyApp/initialize()[C:\Users\Eran.HOME\Documents\Web Projects\MaxiMarketing\TestMarketing\src\DummyApp.mxml:0] at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::childAdded()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\managers\SystemManager.as:2127] at mx.managers::SystemManager/initializeTopLevelWindow()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\managers\SystemManager.as:3396] at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::docFrameHandler()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\managers\SystemManager.as:3219] at mx.managers::SystemManager/docFrameListener()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\managers\SystemManager.as:3065] </code></pre> <p>So I figure I could create a wrapper to the wrapper that can launch my application and came up with this (<code>DummyApp</code> is the application I want to lunch):</p> <pre><code>package { import Components.SidePanel; import flash.display.Sprite; import flash.events.Event; public class AppWrapper extends Sprite { public function AppWrapper() { this.addEventListener(Event.ADDED_TO_STAGE, onAddedToStage); } public function onAddedToStage(e: Event): void { var mainApp:DummyApp = new DummyApp(); this.removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage); } } } </code></pre> <p>Unfortunately - it also failed, and the question remains, how to start Application from a simple AS file?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload