MediaRoom

Kind of class: public class
Package:
Inherits from:
  • MovieClip
Version: 27 Apr 2010
Author: John Polacek, john@johnpolacek.com
Classpath: com.johnpolacek.application.MediaRoom
File last modified: Tuesday, 01 March 2011, 16:08:35
An xml-based full-screen flash site template designed for loading media.

Summary

Constructor
Instance properties
Instance methods

Constructor

MediaRoom

function MediaRoom()

Instance properties

contentCreator

contentCreator = new ContentDisplayCreator()(read,write)

Content creator object

contentHeight

contentHeight:int(read,write)

Height of the content area (dynamic)

currMedia

currMedia:Sprite(read,write)

Current media being displayed

prevMedia

prevMedia:Sprite(read,write)

Previous media being displayed

siteXML

siteXML:XML(read,write)

XML file for site

snipe

snipe:ImageDisplay(read,write)

Graphic aligned to bottom right corner

textStyleSheet

textStyleSheet:StyleSheet(read,write)

Stylesheet for all text

tracker

tracker:AnalyticsTracker(read,write)

Google Analytics tracker

trackingCode

trackingCode:String(read,write)

Tracking code for Google Analytics tracker

Instance methods

createNav

function createNav() : void

Create navigation

createNavButton

function createNavButton(buttonText:String, tag:String = "nav") : Sprite

Creates and retruns a sprite for a single nav button instance

errorHandler

function errorHandler(event:Event) : void

Error message handler

init

function init() : void

Set initial params and add top-level display objects/event listeners

initTracking

function initTracking() : void

Initializes Google Analytics Event Tracking

loadCSS

function loadCSS() : void

Loads css

loadFonts

function loadFonts(fontsArray:Array) : void

Loads runtime fonts

loadFooter

function loadFooter() : void

Loads footer

loadMedia

function loadMedia(url:String, w:int, h:int) : void

Loads media

Parameters
url:URL of media file(s) to load

loadSiteXML

function loadSiteXML(url:String) : void

Loads main site xml file which contains all site configuration settings.

loadSnipe

function loadSnipe() : void

onButtonSelect

function onButtonSelect(event:UIEvent) : void

Actions initiated when nav button is clicked

onCSSLoadComplete

function onCSSLoadComplete(event:Event) : void

After CSS load completes, load runtime fonts

onCSSLoadError

function onCSSLoadError(event:IOErrorEvent) : void

CSS load error handler

onFontsLoadComplete

function onFontsLoadComplete(event:Event) : void

Load first content section after fonts load complete

onFooterLoadComplete

function onFooterLoadComplete(event:Event = null) : void

Actions initiated after footer load is complete

onFooterLoadError

function onFooterLoadError(event:IOErrorEvent) : void

Footer load error handler

onMediaLoadComplete

function onMediaLoadComplete(event:Event) : void

Actions initiated after section load is complete

onNavGraphicLoadComplete

function onNavGraphicLoadComplete(event:Event) : void

onRuntimeAssetsLoadComplete

function onRuntimeAssetsLoadComplete(event:Event = null) : void

Load complete handler for runtime.swf

onRuntimeAssetsLoadError

function onRuntimeAssetsLoadError(event:IOErrorEvent) : void

Catches load error is runtime.swf does not exist

onSWFAddressChange

function onSWFAddressChange(event:SWFAddressEvent) : void

SWFAddress change handler

onSiteXMLLoadComplete

function onSiteXMLLoadComplete(event:Event) : void

After site xml loads, initiates next action

onSiteXMLLoadError

function onSiteXMLLoadError(event:IOErrorEvent) : void

Site XML load error handler

onSnipeLoadComplete

function onSnipeLoadComplete(event:Event = null) : void

Header complete handler

onStageResize

function onStageResize(event:Event = null) : void

Stage resizing manager

onSubNavButtonSelect

function onSubNavButtonSelect(event:UIEvent) : void

Actions initiated when nav button is clicked

onVideoPlaybackFinish

function onVideoPlaybackFinish(event:UIEvent) : void

onVideoPlaybackStart

function onVideoPlaybackStart(event:UIEvent) : void

resizeSWF

function resizeSWF() : void

Uses swffit.js to resize swfobject container div

track

function track(trackAction:String, trackLabel:String = "") : void

Send tracking call to Google Analytics

trackEventHandler

function trackEventHandler(event:TrackEvent) : void

Initializes Google Analytics Event Tracking

transitionFooter

function transitionFooter(navHeightMod:int) : void

Transition in animation for footer

transitionMediaIn

function transitionMediaIn(media:Sprite) : void

Transition in animation for content sections

transitionMediaInComplete

function transitionMediaInComplete(media:Sprite) : void

Transition in animation for content sections

transitionMediaOut

function transitionMediaOut(media:Sprite) : void

Transition out animation for content sections

transitionMediaOutComplete

function transitionMediaOutComplete(media:Sprite) : void

Transition out animation for content sections

transitionNavIn

function transitionNavIn() : void

Transition in animation for nav

transitionNavInComplete

function transitionNavInComplete() : void

Transition in animation for nav