FullScreenSite

Kind of class: public class
Package:
Inherits from:
  • MovieClip
Known subclasses:
Version: 27 Apr 2010
Author: John Polacek, john@johnpolacek.com
Classpath: com.johnpolacek.application.FullScreenSite
File last modified: Thursday, 24 February 2011, 22:09:57
An xml-based full-screen fixed two-column flash site template.

Summary

Constructor
Constants
Instance properties
Instance methods

Constructor

FullScreenSite

function FullScreenSite()

Constants

SECTION_TYPE_BLOG

static const SECTION_TYPE_BLOG:String = "blog"

Instance properties

background

background:Sprite = new Sprite()(read,write)

Background sprite (can be a color or an external image file

container

container:Sprite = new Sprite()(read,write)

Container for all display objects above the background

containerWidth

containerWidth:int(read,write)

Width of the container sprite

contentCreator

contentCreator = new ContentDisplayCreator()(read,write)

Content creator object

currSectionIndex

currSectionIndex:int(read,write)

Current section loaded

format

format:SiteFormat(read,write)

Format object for site

masthead

masthead:ContentContainer(read,write)

Contains content for masthead

numSections

numSections:int(read,write)

Number of sections in the site

scrollbar

scrollbar:FullScreenScrollbar(read,write)

Scrollbar for container sprite

sectionContainer

sectionContainer:Sprite = new Sprite()(read,write)

Contains dynamically loaded section content

sectionsLoaded

sectionsLoaded:int(read,write)

Number of sections loaded

siteLoadCompleted

siteLoadCompleted:Boolean = false(read,write)

Flag for when load of site is complete

siteXML

siteXML:XML(read,write)

XML file for site

tracker

tracker:AnalyticsTracker(read,write)

Google Analytics tracker

trackingCategory

trackingCategory:String(read,write)

Category field assigned to all tracking calls

trackingCode

trackingCode:String(read,write)

Tracking code for Google Analytics tracker

useSWFAddress

useSWFAddress:Boolean = true(read,write)

If true, uses swfaddress javascript for site navigation

Instance methods

addFullScreenButton

function addFullScreenButton() : void

Adds button for switching to full screen mode

addSectionContainer

function addSectionContainer() : void

Adds content container

centerContainer

function centerContainer() : void

changeSection

function changeSection(sectionIndex:int) : void

Changes section, either through swfaddress or loadSection directly

Parameters
sectionIndex:Section index to load

configureContainer

function configureContainer() : void

Sets container position and size

createNav

function createNav() : void

Create navigation

createNavButton

function createNavButton(buttonText:String) : Sprite

Creates and retruns a sprite for a single nav button instance

errorHandler

function errorHandler(errorMessage:String) : void

Error message handler

init

function init() : void

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

initLightbox

function initLightbox() : void

Initializes and formats lightbox

initScrollbar

function initScrollbar() : void

Initializes and formats scrollbar

initTracking

function initTracking()

Initializes Google Analytics Event Tracking

loadBackground

function loadBackground() : void

Creates site background

loadCSS

function loadCSS() : void

Loads css

loadFonts

function loadFonts(fontsArray:Array) : void

Loads runtime fonts

loadFooter

function loadFooter() : void

Loads footer

loadHeader

function loadHeader() : void

Loads header ContentPanel

loadMasthead

function loadMasthead() : void

Loads masthead

loadSection

function loadSection(sectionIndex:int) : void

Loads section

Parameters
sectionIndex:Section index to load

loadSidebar

function loadSidebar() : void

Loads sidebar

loadSiteXML

function loadSiteXML(url:String) : void

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

onBackgroundComplete

function onBackgroundComplete(event:Event = null) : void

Actions initiated after background complete

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

onFullScreenClick

function onFullScreenClick(event:MouseEvent) : void

onHeaderError

function onHeaderError(event:Event = null) : void

Header complete handler

onHeaderLoadComplete

function onHeaderLoadComplete(event:Event = null) : void

Header complete handler

onLightboxTextLoadComplete

function onLightboxTextLoadComplete(event:Event) : void

Load handler for externally loaded text formatted with lightbox content info

onLightboxTextLoadError

function onLightboxTextLoadError(event:Event) : void

onLightboxView

function onLightboxView(event:LightboxEvent) : void

Initiates display of lightbox content

onMastheadClick

function onMastheadClick(event:MouseEvent) : void

Actions initiated when masthead is clicked

onMastheadComplete

function onMastheadComplete(event:Event = null) : void

Masthead complete handler

onMastheadXMLLoadError

function onMastheadXMLLoadError(event:IOErrorEvent) : void

Masthead xml io error handler

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

onScroll

function onScroll(event:UIEvent) : void

Scrolls content

onSectionContainerLoadComplete

function onSectionContainerLoadComplete(event:Event = null) : void

Actions initiated after first section has loaded

onSectionLoadComplete

function onSectionLoadComplete(event:Event) : void

Actions initiated after section load is complete

onSidebarLoadComplete

function onSidebarLoadComplete(event:Event = null) : void

Actions initiated after sidebar load is complete

onSidebarLoadError

function onSidebarLoadError(event:IOErrorEvent) : void

Sidebar load error handler

onSiteLoadComplete

function onSiteLoadComplete() : void

Actions initiated after site load is complete

onSiteXMLLoadComplete

function onSiteXMLLoadComplete(event:Event) : void

After site xml loads, initiates next action

onSiteXMLLoadError

function onSiteXMLLoadError(event:IOErrorEvent) : void

Site XML load error handler

onStageResize

function onStageResize(event:Event = null) : void

Stage resizing manager

scaleBackgroundToStage

function scaleBackgroundToStage() : void

Scales background to stage

setFormatFromXML

function setFormatFromXML() : void

Applies formatting from site xml.

textLinkHandler

function textLinkHandler(event:TextEvent) : void

Handles text link events (lightboxing)

track

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

Send tracking call to Google Analytics

transitionFooterIn

function transitionFooterIn() : void

Transition in animation for footer

transitionHeaderIn

function transitionHeaderIn() : void

Transition in animation for header

transitionNavIn

function transitionNavIn() : void

Transition in animation for nav

transitionSectionIn

function transitionSectionIn(section:DisplayObject) : void

Transition in animation for content sections

transitionSectionInComplete

function transitionSectionInComplete(section:DisplayObject) : void

Transition in animation for content sections

transitionSectionOut

function transitionSectionOut(section:DisplayObject) : void

Transition out animation for content sections

transitionSectionOutComplete

function transitionSectionOutComplete(section:DisplayObject) : void

Transition out animation for content sections

transitionSidebarIn

function transitionSidebarIn() : void

Transition in animation for sidebar