diff --git a/examples/ebook/assets/config.xml b/examples/ebook/assets/config.xml
index 2d79af6..39d64d6 100644
--- a/examples/ebook/assets/config.xml
+++ b/examples/ebook/assets/config.xml
@@ -14,11 +14,12 @@
-
+
+
-
+
@@ -49,4 +50,7 @@
+
+
+
\ No newline at end of file
diff --git a/examples/ebook/assets/options/swfBoy.png b/examples/ebook/assets/options/swfBoy.png
new file mode 100644
index 0000000..e702a64
Binary files /dev/null and b/examples/ebook/assets/options/swfBoy.png differ
diff --git a/examples/ebook/assets/swflibrary.fla b/examples/ebook/assets/swflibrary.fla
new file mode 100644
index 0000000..3c4b91c
Binary files /dev/null and b/examples/ebook/assets/swflibrary.fla differ
diff --git a/examples/ebook/assets/swflibrary.swf b/examples/ebook/assets/swflibrary.swf
new file mode 100644
index 0000000..80a44f4
Binary files /dev/null and b/examples/ebook/assets/swflibrary.swf differ
diff --git a/examples/ebook/project.xml b/examples/ebook/project.xml
index 8cac845..74312c3 100644
--- a/examples/ebook/project.xml
+++ b/examples/ebook/project.xml
@@ -15,8 +15,11 @@
+
-
+
+
+
diff --git a/haxelib.json b/haxelib.json
index e760023..5bc6815 100644
--- a/haxelib.json
+++ b/haxelib.json
@@ -5,8 +5,8 @@
"description": "Glory Framework is a page-based media framework built using [Haxe 3](http://haxe.org/), [OpenFL](http://openfl.org), and [PureMVC](http://puremvc.org/). It can be used for interactive e-books, adventure games, websites, or slide presentations on any target supported by OpenFL. It uses an XML configuration file to build the layout of each page, including placement and function of different controls. Each page can have its own custom class if desired. Glory also includes two Photoshop scripts which make it easy to rapidly convert a PSD layout into something that Glory can use. It can also use SVG files saved directly from Illustrator (not all types of object are supported).",
"contributors": ["ConfidantCommunications"],
"classPath":"src/",
- "releasenote": "Modified to use PureMVC from Haxelib.",
- "version": "1.1.0",
+ "releasenote": "Now supporting swf assets.",
+ "version": "1.2.0",
"url": "https://github.com/ConfidantCommunications/Glory-Framework/",
"dependencies": {
"openfl" :"",
diff --git a/src/ca/confidant/glory/controller/BuildPageCommand.hx b/src/ca/confidant/glory/controller/BuildPageCommand.hx
index 767b095..441c97c 100644
--- a/src/ca/confidant/glory/controller/BuildPageCommand.hx
+++ b/src/ca/confidant/glory/controller/BuildPageCommand.hx
@@ -1 +1 @@
-
package ca.confidant.glory.controller;
import flash.display.Sprite;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.DisplayObject;
import haxe.xml.Fast;
//import nme.Assets; //moved to loaderProxy
import org.puremvc.haxe.patterns.command.SimpleCommand;
import org.puremvc.haxe.interfaces.INotification;
import ca.confidant.glory.view.PageMediator;
import ca.confidant.glory.view.ApplicationMediator;
import ca.confidant.glory.view.ActorComponentMediator;
import ca.confidant.glory.view.components.ActorComponent;
import ca.confidant.glory.view.components.PageComponent;
import ca.confidant.glory.model.ControlsRegistryProxy;
import ca.confidant.glory.ApplicationFacade;
import ca.confidant.glory.model.PagesConfigProxy;
import ca.confidant.glory.model.ActorComponentConfigProxy;
import ca.confidant.glory.model.LoaderProxy;
//import ca.confidant.glory.controller.ClassConverter;
/*
* @author Allan Dowdeswell
* This is triggered first by the GotoIntroCommand, then by calls to the ChangePageCommand.
* It retrieves configuration information from the PageConfigProxy and puts the page together
* with the necessary mediators.
*/
class BuildPageCommand extends SimpleCommand
{
var pcp:PagesConfigProxy;
var appMediator:ApplicationMediator;
var lp:LoaderProxy;
public function new(){
super();
}
override public function execute( note:INotification ) : Void
{
trace('BuildPageCommand');
//trace(ClassConverter.theContent);
pcp=cast(facade.retrieveProxy(PagesConfigProxy.NAME) , PagesConfigProxy);
lp=cast(facade.retrieveProxy(LoaderProxy.NAME) , LoaderProxy);
appMediator = cast(facade.retrieveMediator(ApplicationMediator.NAME) , ApplicationMediator);
var pageId=cast(note.getBody(),String);//current page
//var s:PageComponent=new PageComponent();//main page container
//Custom page classes get handled here:
var class_name:String = "pages.P"+pageId;
var a_class = Type.resolveClass( class_name );
var s = ( a_class != null ) ? Type.createInstance( a_class,[] ) : new PageComponent();
s.name=pageId;
if(pcp.getPageById(pageId).get("type")=="overlay"){
//trace("overlay");
appMediator.addDisplayObject(s,-1);
} else {
//trace("not overlay");
appMediator.addDisplayObject(s,0);
}
//trace("page holder added: "+pageId);
var pm = new PageMediator(pageId,s);
facade.registerMediator(pm);
s.transitionIn();
var actorsList=pcp.getPageActors(pageId);
//trace("length:"+actorsList.length);
if (actorsList.length>0){
for (thisActor in actorsList){
//trace("makeActor: "+thisActor.att.id);
s.addActor(thisActor.att.id, makeActor(thisActor));
//appMediator.addDisplayObject(makeActor(thisActor),0);
}
}
var crp=cast(facade.retrieveProxy(ControlsRegistryProxy.NAME),ControlsRegistryProxy);
var controls=crp.getControls();
for(thisControl in controls){
appMediator.getApp().removeChild(thisControl);
appMediator.getApp().addChild(thisControl);
//trace("control:"+thisControl.x+":"+thisControl.y);
//var newx=thisControl.x;
//thisControl.x=newx;
//var newy=thisControl.y;
//thisControl.y=newy;
}
s.init();
}
private function makeActor(actor:Fast):ActorComponent{
//try{
var ext:String=cast(actor.att.src,String).substr(-3);
//trace("ext:"+ext);
//var class_name:String = "actors.Asomething";
//var a = Type.createInstance( Type.resolveClass(class_name), [] );
//if(a!=null){
var a=new ActorComponent();
//}
//trace(imageData+ " is my data");
if(ext=="svg"){
var theText=lp.getText("assets/"+actor.att.src);
a.addSVG(theText);
} else {
var imageData:BitmapData = lp.getBitmapData("assets/"+actor.att.src,true);
var b=new Bitmap (imageData);
a.addBitmap(b);
}
var action:String;
if(actor.has.action){
action=Std.string(actor.att.action);
} else {
action='';
}
var accp:ActorComponentConfigProxy=new ActorComponentConfigProxy(actor.att.id,Std.string(actor.att.type), action);
facade.registerProxy(accp);
var acm = new ActorComponentMediator(actor.att.id,a,accp);
facade.registerMediator(acm);
//appMediator.addDisplayObject(a);
a.x=Std.parseInt(actor.att.x);
a.y=Std.parseInt(actor.att.y);
a.width=Std.parseInt(actor.att.width);
a.height=Std.parseInt(actor.att.height);
a.type=actor.att.type;
a.name=actor.att.id;
if(a.type=="control"){
a.mouseEnabled=true;
a.useHandCursor=true;
a.buttonMode=true;
}
return a;
//} catch(e:Dynamic){
//trace(Std.string(e));
//}
}
}
+package ca.confidant.glory.controller;
import flash.display.Sprite;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.DisplayObject;
import haxe.xml.Fast;
import openfl.Assets;
import org.puremvc.haxe.patterns.command.SimpleCommand;
import org.puremvc.haxe.interfaces.INotification;
import ca.confidant.glory.view.PageMediator;
import ca.confidant.glory.view.ApplicationMediator;
import ca.confidant.glory.view.ActorComponentMediator;
import ca.confidant.glory.view.components.ActorComponent;
import ca.confidant.glory.view.components.PageComponent;
import ca.confidant.glory.model.ControlsRegistryProxy;
import ca.confidant.glory.ApplicationFacade;
import ca.confidant.glory.model.PagesConfigProxy;
import ca.confidant.glory.model.ActorComponentConfigProxy;
import ca.confidant.glory.model.LoaderProxy;
//import ca.confidant.glory.controller.ClassConverter;
/*
* @author Allan Dowdeswell
* This is triggered first by the GotoIntroCommand, then by calls to the ChangePageCommand.
* It retrieves configuration information from the PageConfigProxy and puts the page together
* with the necessary mediators.
*/
class BuildPageCommand extends SimpleCommand
{
var pcp:PagesConfigProxy;
var appMediator:ApplicationMediator;
var lp:LoaderProxy;
public function new(){
super();
}
override public function execute( note:INotification ) : Void
{
trace('BuildPageCommand');
//trace(ClassConverter.theContent);
pcp=cast(facade.retrieveProxy(PagesConfigProxy.NAME) , PagesConfigProxy);
lp=cast(facade.retrieveProxy(LoaderProxy.NAME) , LoaderProxy);
appMediator = cast(facade.retrieveMediator(ApplicationMediator.NAME) , ApplicationMediator);
var pageId=cast(note.getBody(),String);//current page
//var s:PageComponent=new PageComponent();//main page container
//Custom page classes get handled here:
var class_name:String = "pages.P"+pageId;
var a_class = Type.resolveClass( class_name );
var s = ( a_class != null ) ? Type.createInstance( a_class,[] ) : new PageComponent();
s.name=pageId;
if(pcp.getPageById(pageId).get("type")=="overlay"){
//trace("overlay");
appMediator.addDisplayObject(s,-1);
} else {
//trace("not overlay");
appMediator.addDisplayObject(s,0);
}
//trace("page holder added: "+pageId);
var pm = new PageMediator(pageId,s);
facade.registerMediator(pm);
s.transitionIn();
var actorsList=pcp.getPageActors(pageId);
//trace("length:"+actorsList.length);
if (actorsList.length>0){
for (thisActor in actorsList){
//trace("makeActor: "+thisActor.att.id);
s.addActor(thisActor.att.id, makeActor(thisActor));
//appMediator.addDisplayObject(makeActor(thisActor),0);
}
}
var crp=cast(facade.retrieveProxy(ControlsRegistryProxy.NAME),ControlsRegistryProxy);
var controls=crp.getControls();
for(thisControl in controls){
appMediator.getApp().removeChild(thisControl);
appMediator.getApp().addChild(thisControl);
//trace("control:"+thisControl.x+":"+thisControl.y);
//var newx=thisControl.x;
//thisControl.x=newx;
//var newy=thisControl.y;
//thisControl.y=newy;
}
s.init();
}
private function makeActor(actor:Fast):ActorComponent{
//try{
var ext:String=cast(actor.att.src,String).substr(-3);
//trace("ext:"+ext);
//var class_name:String = "actors.Asomething";
//var a = Type.createInstance( Type.resolveClass(class_name), [] );
//if(a!=null){
var a=new ActorComponent();
//}
//trace(imageData+ " is my data");
switch(ext){
case "svg":
var theText=lp.getText("assets/"+actor.att.src);
a.addSVG(theText);
case "jpg":
var imageData:BitmapData = lp.getBitmapData("assets/"+actor.att.src,true);
var b=new Bitmap (imageData);
a.addBitmap(b);
case "gif":
var imageData:BitmapData = lp.getBitmapData("assets/"+actor.att.src,true);
var b=new Bitmap (imageData);
a.addBitmap(b);
case "png":
var imageData:BitmapData = lp.getBitmapData("assets/"+actor.att.src,true);
var b=new Bitmap (imageData);
a.addBitmap(b);
default: //must be a swf
//load swf asset per instructions at http://www.openfl.org/learn/tutorials/using-swf-assets/
var clip = Assets.getMovieClip (actor.att.src);
trace("loading:"+actor.att.src);
a.addChild(clip);
}
/*if(ext=="svg"){
var theText=lp.getText("assets/"+actor.att.src);
a.addSVG(theText);
} else {
var imageData:BitmapData = lp.getBitmapData("assets/"+actor.att.src,true);
var b=new Bitmap (imageData);
a.addBitmap(b);
}*/
var action:String;
if(actor.has.action){
action=Std.string(actor.att.action);
} else {
action='';
}
var accp:ActorComponentConfigProxy=new ActorComponentConfigProxy(actor.att.id,Std.string(actor.att.type), action);
facade.registerProxy(accp);
var acm = new ActorComponentMediator(actor.att.id,a,accp);
facade.registerMediator(acm);
//appMediator.addDisplayObject(a);
a.x=Std.parseInt(actor.att.x);
a.y=Std.parseInt(actor.att.y);
a.width=Std.parseInt(actor.att.width);
a.height=Std.parseInt(actor.att.height);
a.type=actor.att.type;
a.name=actor.att.id;
if(a.type=="control"){
a.mouseEnabled=true;
a.useHandCursor=true;
a.buttonMode=true;
}
return a;
//} catch(e:Dynamic){
//trace(Std.string(e));
//}
}
}
diff --git a/src/ca/confidant/glory/controller/ChangePageCommand.hx b/src/ca/confidant/glory/controller/ChangePageCommand.hx
index e5e94a1..e6a40b9 100644
--- a/src/ca/confidant/glory/controller/ChangePageCommand.hx
+++ b/src/ca/confidant/glory/controller/ChangePageCommand.hx
@@ -1 +1 @@
-
package ca.confidant.glory.controller;
//import js.Dom;
import flash.display.Sprite;
import haxe.xml.Fast;
import openfl.Assets;
import org.puremvc.haxe.patterns.command.SimpleCommand;
import org.puremvc.haxe.interfaces.INotification;
// import ca.confidant.glory.ApplicationFacade;
import ca.confidant.glory.view.PageMediator;
import ca.confidant.glory.view.ApplicationMediator;
import ca.confidant.glory.ApplicationFacade;
//import Main;
// import ca.confidant.glory.model.LoaderProxy;
import ca.confidant.glory.model.PagesConfigProxy;
import ca.confidant.glory.model.StateProxy;
import ca.confidant.glory.view.constants.ControlConstants;
import ca.confidant.glory.model.ControlsRegistryProxy;
import flash.display.DisplayObject;
import haxe.Timer;
/*
* @author Allan Dowdeswell
* This is triggered by any control that has a pageForward, pageBackward, or pageSkipTo action.
* It triggers BuildPageCommand and RemovePageCommand and updates the current page in the PageConfigProxy.
* It also triggers transitions, DestroyPageSoundsCommand and InitPageSoundsCommand.
*/
class ChangePageCommand extends SimpleCommand
{
var pcp:PagesConfigProxy;
var sp:StateProxy;
var appMediator:ApplicationMediator;
//var csp:ControlsRegistryProxy;
private function doTransition(id:String,type:String):Void{
//trace("doTransition")
var t:Map=new Map();
t.set("id",id);
t.set("transitionType",type);
sendNotification(ApplicationFacade.DO_TRANSITION, t);
}
override public function execute( note:INotification ) : Void
{
trace('-------------------------'+note.getBody());
sp=cast(facade.retrieveProxy(StateProxy.NAME) , StateProxy);
if(sp.getState()==GloryState.TRANSITIONING) return;
pcp=cast(facade.retrieveProxy(PagesConfigProxy.NAME) , PagesConfigProxy);
appMediator = cast(facade.retrieveMediator(ApplicationMediator.NAME) , ApplicationMediator);
var action=cast(note.getBody(),String);//current page
var waitTimerOut:Timer;
var outPageId:String=pcp.getCurrentPage().get("id");
sp.setState(GloryState.TRANSITIONING);
switch(action){
case ControlConstants.PAGE_FORWARD:
//var current:Hash=pcp.getCurrentPage();
var nextPage=pcp.getNextPage();
if (nextPage != null){
doTransition(outPageId, "out");
waitTimerOut=new Timer(pcp.getPageTransitionOutTime(outPageId)*1000);
trace("out time:"+pcp.getPageTransitionOutTime(outPageId));
waitTimerOut.run = function():Void{
waitTimerOut.stop();
sendNotification(ApplicationFacade.REMOVE_PAGE, outPageId);
sendNotification(ApplicationFacade.DESTROY_PAGE_SOUNDS, outPageId);
sendNotification(ApplicationFacade.INIT_PAGE_SOUNDS, nextPage.get("id"));
sendNotification(ApplicationFacade.BUILD_PAGE, nextPage.get("id"));
//doTransition(nextPage.get("id"), "in");
pcp.setCurrentPageById(nextPage.get("id"));
sp.setState(GloryState.READY);
}
}
//floatControls();
case ControlConstants.PAGE_BACKWARD:
//var current:Hash=pcp.getCurrentPage();
var prevPage=pcp.getPreviousPage();
if (prevPage != null){
doTransition(outPageId, "out");
waitTimerOut=new Timer(pcp.getPageTransitionOutTime(outPageId)*1000);
trace("out time:"+pcp.getPageTransitionOutTime(outPageId));
waitTimerOut.run = function():Void{
waitTimerOut.stop();
sendNotification(ApplicationFacade.REMOVE_PAGE, outPageId);
sendNotification(ApplicationFacade.DESTROY_PAGE_SOUNDS, outPageId);
sendNotification(ApplicationFacade.INIT_PAGE_SOUNDS, prevPage.get("id"));
sendNotification(ApplicationFacade.BUILD_PAGE, prevPage.get("id"));
//doTransition(prevPage.get("id"), "in");
pcp.setCurrentPageById(prevPage.get("id"));
sp.setState(GloryState.READY);
}
}
//floatControls();
default:
// must be a skip
var p=pcp.getPageById(action);
var overlay:Bool=p.get("type")=="overlay";
if(p != null){
//if it's an overlay, we don't remove the underlying page or change the current page
if(!overlay){
doTransition(outPageId, "out");
waitTimerOut=new Timer(pcp.getPageTransitionOutTime(outPageId)*1000);
trace("out time:"+pcp.getPageTransitionOutTime(outPageId));
waitTimerOut.run = function():Void{
waitTimerOut.stop();
sendNotification(ApplicationFacade.REMOVE_PAGE, outPageId);
sendNotification(ApplicationFacade.DESTROY_PAGE_SOUNDS, outPageId);
sendNotification(ApplicationFacade.INIT_PAGE_SOUNDS, p.get("id"));
sendNotification(ApplicationFacade.BUILD_PAGE, p.get("id"));
//doTransition(p.get("id"), "in");
pcp.setCurrentPageById(p.get("id"));
sp.setState(GloryState.READY);
}
} else {
//transition in the overlay
sendNotification(ApplicationFacade.INIT_PAGE_SOUNDS, p.get("id"));
sendNotification(ApplicationFacade.BUILD_PAGE, p.get("id"));
sp.setState(GloryState.READY);
//doTransition(p.get("id"), "in");
}
}
}
}
/*private function floatControls():Void{
var crp:ControlsRegistryProxy=cast(facade.retrieveProxy(ControlsRegistryProxy.NAME),ControlsRegistryProxy);
var controls:Array=crp.getControls();
//trace("controls:"+controls.length);
var i=0;
for (thisControl in controls){
//trace("control:"+appMediator.getIndex(thisControl));
//must remove and re-add for the HTML5 target to work
appMediator.removeDisplayObject(thisControl);
appMediator.addDisplayObject(thisControl);
i++;
}
}*/
}
+
package ca.confidant.glory.controller;
//import js.Dom;
import flash.display.Sprite;
import haxe.xml.Fast;
import openfl.Assets;
import org.puremvc.haxe.patterns.command.SimpleCommand;
import org.puremvc.haxe.interfaces.INotification;
// import ca.confidant.glory.ApplicationFacade;
import ca.confidant.glory.view.PageMediator;
import ca.confidant.glory.view.ApplicationMediator;
import ca.confidant.glory.ApplicationFacade;
//import Main;
// import ca.confidant.glory.model.LoaderProxy;
import ca.confidant.glory.model.PagesConfigProxy;
import ca.confidant.glory.model.StateProxy;
import ca.confidant.glory.view.constants.ControlConstants;
import ca.confidant.glory.model.ControlsRegistryProxy;
import flash.display.DisplayObject;
import haxe.Timer;
/*
* @author Allan Dowdeswell
* This is triggered by any control that has a pageForward, pageBackward, or pageSkipTo action.
* It triggers BuildPageCommand and RemovePageCommand and updates the current page in the PageConfigProxy.
* It also triggers transitions, DestroyPageSoundsCommand and InitPageSoundsCommand.
*/
class ChangePageCommand extends SimpleCommand
{
var pcp:PagesConfigProxy;
var sp:StateProxy;
var appMediator:ApplicationMediator;
//var csp:ControlsRegistryProxy;
private function doTransition(id:String,type:String):Void{
//trace("doTransition")
var t:Map=new Map();
t.set("id",id);
t.set("transitionType",type);
sendNotification(ApplicationFacade.DO_TRANSITION, t);
}
override public function execute( note:INotification ) : Void
{
trace('-------------------------'+note.getBody());
sp=cast(facade.retrieveProxy(StateProxy.NAME) , StateProxy);
if(sp.getState()==GloryState.TRANSITIONING) return;
pcp=cast(facade.retrieveProxy(PagesConfigProxy.NAME) , PagesConfigProxy);
appMediator = cast(facade.retrieveMediator(ApplicationMediator.NAME) , ApplicationMediator);
var action=cast(note.getBody(),String);//current page
var waitTimerOut:Timer;
var outPageId:String=pcp.getCurrentPage().get("id");
sp.setState(GloryState.TRANSITIONING);
switch(action){
case ControlConstants.PAGE_FORWARD:
//var current:Hash=pcp.getCurrentPage();
var nextPage=pcp.getNextPage();
if (nextPage != null){
doTransition(outPageId, "out");
waitTimerOut=new Timer(pcp.getPageTransitionOutTime(outPageId)*1000);
trace("out time:"+pcp.getPageTransitionOutTime(outPageId));
waitTimerOut.run = function():Void{
waitTimerOut.stop();
sendNotification(ApplicationFacade.REMOVE_PAGE, outPageId);
sendNotification(ApplicationFacade.DESTROY_PAGE_SOUNDS, outPageId);
sendNotification(ApplicationFacade.INIT_PAGE_SOUNDS, nextPage.get("id"));
sendNotification(ApplicationFacade.BUILD_PAGE, nextPage.get("id"));
//doTransition(nextPage.get("id"), "in");
pcp.setCurrentPageById(nextPage.get("id"));
sp.setState(GloryState.READY);
}
} else {
sp.setState(GloryState.READY);
}
//floatControls();
case ControlConstants.PAGE_BACKWARD:
//var current:Hash=pcp.getCurrentPage();
var prevPage=pcp.getPreviousPage();
if (prevPage != null){
doTransition(outPageId, "out");
waitTimerOut=new Timer(pcp.getPageTransitionOutTime(outPageId)*1000);
trace("out time:"+pcp.getPageTransitionOutTime(outPageId));
waitTimerOut.run = function():Void{
waitTimerOut.stop();
sendNotification(ApplicationFacade.REMOVE_PAGE, outPageId);
sendNotification(ApplicationFacade.DESTROY_PAGE_SOUNDS, outPageId);
sendNotification(ApplicationFacade.INIT_PAGE_SOUNDS, prevPage.get("id"));
sendNotification(ApplicationFacade.BUILD_PAGE, prevPage.get("id"));
//doTransition(prevPage.get("id"), "in");
pcp.setCurrentPageById(prevPage.get("id"));
sp.setState(GloryState.READY);
}
} else {
sp.setState(GloryState.READY);
}
//floatControls();
default:
// must be a skip
var p=pcp.getPageById(action);
var overlay:Bool=p.get("type")=="overlay";
if(p != null){
//if it's an overlay, we don't remove the underlying page or change the current page
if(!overlay){
doTransition(outPageId, "out");
waitTimerOut=new Timer(pcp.getPageTransitionOutTime(outPageId)*1000);
trace("out time:"+pcp.getPageTransitionOutTime(outPageId));
waitTimerOut.run = function():Void{
waitTimerOut.stop();
sendNotification(ApplicationFacade.REMOVE_PAGE, outPageId);
sendNotification(ApplicationFacade.DESTROY_PAGE_SOUNDS, outPageId);
sendNotification(ApplicationFacade.INIT_PAGE_SOUNDS, p.get("id"));
sendNotification(ApplicationFacade.BUILD_PAGE, p.get("id"));
//doTransition(p.get("id"), "in");
pcp.setCurrentPageById(p.get("id"));
sp.setState(GloryState.READY);
}
} else {
//transition in the overlay
sendNotification(ApplicationFacade.INIT_PAGE_SOUNDS, p.get("id"));
sendNotification(ApplicationFacade.BUILD_PAGE, p.get("id"));
sp.setState(GloryState.READY);
//doTransition(p.get("id"), "in");
}
} else {
sp.setState(GloryState.READY);
}
}
}
/*private function floatControls():Void{
var crp:ControlsRegistryProxy=cast(facade.retrieveProxy(ControlsRegistryProxy.NAME),ControlsRegistryProxy);
var controls:Array=crp.getControls();
//trace("controls:"+controls.length);
var i=0;
for (thisControl in controls){
//trace("control:"+appMediator.getIndex(thisControl));
//must remove and re-add for the HTML5 target to work
appMediator.removeDisplayObject(thisControl);
appMediator.addDisplayObject(thisControl);
i++;
}
}*/
}