package core { import com.gaiaframework.api.IPage; import com.gaiaframework.events.GaiaSWFAddressEvent; import com.gaiaframework.events.PageEvent; import org.robotlegs.mvcs.Mediator; /** * @author Kevin Cao */ public class PageMediator extends Mediator { override public function onRegister() : void { var page : IPage = getPageComponent(); eventMap.mapListener(page, PageEvent.TRANSITION_IN, onTransitionIn, PageEvent); eventMap.mapListener(page, PageEvent.TRANSITION_IN_COMPLETE, onTransitionInComplete, PageEvent); eventMap.mapListener(page, PageEvent.TRANSITION_OUT, onTransitionOut, PageEvent); eventMap.mapListener(page, PageEvent.TRANSITION_OUT_COMPLETE, onTransitionOutComplete, PageEvent); eventMap.mapListener(page, GaiaSWFAddressEvent.DEEPLINK, onDeeplink, GaiaSWFAddressEvent); } public function getPageComponent() : IPage { return IPage(viewComponent); } public function onTransitionIn(event : PageEvent) : void { } public function onTransitionOut(event : PageEvent) : void { } public function onTransitionInComplete(event : PageEvent) : void { } public function onTransitionOutComplete(event : PageEvent) : void { } public function onDeeplink(event : GaiaSWFAddressEvent) : void { } } }