I wrote a big Actionscript project using AS3 as an "Actionscript Project" in Flash Builder 4.5. I have a bunch of solid, reusable, code, but one of the big components is a main.as file that extends Sprite and serves as the display code for my application.
I now, for various reasons, need that to be a Flex application. I'm trying to get the most minimal wrapper possible, so here's what I have (thanks to the internet):
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="590" minHeight="700"
initialize="initPlayer()">`
<fx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.core.UIComponent;
public function initPlayer():void {
Alert.show("Testing!");
var comp:UIComponent = new UIComponent();
comp.addChild(new MainView());
addChild(comp);
}
]]>
</fx:Script>
</s:Application>
when I launch this, however, it comes up with a blank window. No errors, the alert doesn't fire, nothing. Any idea what's going on?