ContentDisplayCreator

Kind of class: public class
Package:
Inherits from:
  • none
Version: 4 Apr 2010 Changed class/package name. Renamed createContent() method to create()
29 Mar 2010 Updated contentInfo property names for audio
12 Mar 2010 Added contentPath property and background properties for FlashDisplay
6 Mar 2010
Author: John Polacek, john@johnpolacek.com
Classpath: com.johnpolacek.display.ContentDisplayCreator
File last modified: Tuesday, 24 Augustus 2010, 17:26:45
A Simple Factory class that constructs ContentDisplay sprites Uses the ContentCreator simple Factory to generate content containers
Example
  • import com.johnpolacek.display.ContentDisplay;
    import com.johnpolacek.display.ContentDisplayCreator;
    var example:ContentDisplay;
    var creator:ContentDisplayCreator = new ContentCreator();
    example = creator.create("video.flv");
    

Summary

Constants
  • IMAGE : String
    • Constant for generating ImageDisplay sprites
  • VIDEO : String
    • Constant for generating VideoDisplay sprites
  • AUDIO : String
    • Constant for generating AudioDisplay sprites
  • SLIDESHOW : String
    • Constant for generating AutoSlideShowDisplay sprites
  • FLASH : String
    • Constant for generating FlashDisplay sprites
  • INVALID : String
    • Constant for catching invalid content types
Instance properties
  • contentPath : String
    • Can set to add a path to all createContent calls
Instance methods
  • create (contentURL:String, contentInfo:Object = null)
    • Builds and returns a ContentDisplay sprite

Constants

AUDIO

static const AUDIO:String = "audio"

Constant for generating AudioDisplay sprites

FLASH

static const FLASH:String = "flash"

Constant for generating FlashDisplay sprites

IMAGE

static const IMAGE:String = "image"

Constant for generating ImageDisplay sprites

INVALID

static const INVALID:String = "invalid"

Constant for catching invalid content types

SLIDESHOW

static const SLIDESHOW:String = "slideshow"

Constant for generating AutoSlideShowDisplay sprites

VIDEO

static const VIDEO:String = "video"

Constant for generating VideoDisplay sprites

Instance properties

contentPath

contentPath:String = ""(read,write)

Can set to add a path to all createContent calls

Instance methods

create

function create(contentURL:String, contentInfo:Object = null)

Builds and returns a ContentDisplay sprite

Parameters
 
Returns
  • If content is valid, returns a ContentDisplay sprite