Приветствую всех.
@SkepticalFoxТы не мог бы слегка освежить и дополнить информацию из этого поста для начинающих, как я?
Библиотеки каким-то чудом были найдены на битбакете, но при пошаговом повторении возникла проблема.
Буду рад, если кто подскажет в чем проблема
Main.as
package
{
import flash.display.Sprite;
import flash.events.Event;
public class Main extends Sprite
{
private var tw : TestWindow
public function Main()
{
if (stage) init();
else addEventListener(Event.ADDED_TO_STAGE, init);
}
private function init(e:Event = null):void
{
removeEventListener(Event.ADDED_TO_STAGE, init);
// entry point
tw = new TestWindow();
}
}
}
TestWindow.as
package
{
import net.wg.infrastructure.base.AbstractWindowView;
import net.wg.gui.components.controls.SoundButton;
import flash.text.*;
public class TestWindow extends AbstractWindowView
{
private var soundButtonOk : SoundButton;
private var soundButtonCancel : SoundButton;
private var textFieldTest : TextField;
public function TestWindow()
{
super();
}
override protected function onPopulate() : void
{
super.onPopulate();
width = 600;
height = 400;
window.title = "Test Window";
textFieldTest = new TextField();
textFieldTest.width = 590;
textFieldTest.height = 360;
textFieldTest.x = 5;
textFieldTest.y = 0;
textFieldTest.multiline = true;
textFieldTest.selectable = false;
textFieldTest.defaultTextFormat = new TextFormat("$FieldFont", 10, 0xFFFFFF);
textFieldTest.text = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.";
addChild(textFieldTest);
soundButtonOk = addChild(App.utils.classFactory.getComponent("ButtonNormal", SoundButton, {
width: 100,
height: 25,
x: 195,
y: 365,
label: "Ok"
})) as SoundButton;
soundButtonCancel = addChild(App.utils.classFactory.getComponent("ButtonNormal", SoundButton, {
width: 100,
height: 25,
x: 305,
y: 365,
label: "Cancel"
})) as SoundButton;
}
}
}
Смущает однако, что после компиляции .swf с моим классом пустой, и собственно, при запуске я кнопочек не вижу.
Может кто дать наводку?