/* FOR TEXTMATE (and E Editor?) ONLY */
/* auto clear for modern browsers */
${1:element}:after{
content: ".";
display: block;
height: 0;
font-size:0;
clear: both;
visibility:hidden;
}
/* auto clear for the browser that could...
this needs the css_browser_select js script :
http://rafael.adm.br/css_browser_selector/css_browser_selector.js.txt */
.ie ${1:element}{
height: 1%;
display:block;
}
/**
* Base PureMVC Project
*/
package view
{
import flash.display.Stage;
import flash.events.MouseEvent;
import org.puremvc.as3.interfaces.*;
import org.puremvc.as3.patterns.mediator.Mediator;
import ApplicationFacade;
/**
* A Mediator for interacting with the Stage.
*/
public class StageMediator extends Mediator implements IMediator
{
// Cannonical name of the Mediator
public static const NAME:String = "StageMediator";
public function StageMediator( viewComponent:Object )
{
/**
* pass the viewComponent to the superclass where
* it will be stored in the inherited viewComponent property
*/
super( NAME, viewComponent );
}
/**
* StageMediator lists the INITIALIZE_SITE notification as an
* event of interest. You may list as many notification
* interests as needed.
*/
override public function listNotificationInterests():Array
{
return [
ApplicationFacade.INITIALIZE_SITE
];
}
/**
* Called by the framework when a notification is sent that
* this mediator expressed an interest in.
*/
override public function handleNotification( note:INotification ):void
{
switch ( note.getName() )
{
/**
* If the notification sent has a name matching
* ApplicationFacade.INITIALIZE_SITE then this code block will execute
*/
case ApplicationFacade.INITIALIZE_SITE:
initializeSite();
break;
}
}
/**
* Called to handle the INITIALIZE_SITE notification.
* Creates SiteMediator, NavMediator, BodyMediator to provide
* PureMVC functionality to the varies view components of the application.
*/
private function initializeSite():void
{
}
/**
* Retrieves the viewComponent and casting it to type Stage
*/
protected function get stage():Stage
{
return viewComponent as Stage;
}
}
}
/**
* Base PureMVC Project
*/
package controller
{
import flash.display.Stage;
import org.puremvc.as3.interfaces.ICommand;
import org.puremvc.as3.interfaces.INotification;
import org.puremvc.as3.patterns.command.SimpleCommand;
import ApplicationFacade;
import view.StageMediator;
/**
* Simple StartupCommand for PureMVC Structured Project
*/
public class StartupCommand extends SimpleCommand implements ICommand
{
override public function execute( note:INotification ) : void
{
/**
* Get the View Components for the Mediators from the app,
* which passed a reference to itself on the notification.
*/
var stage:Stage = note.getBody() as Stage;
facade.registerMediator( new StageMediator( stage ) );
}
}
}