Packagecom.threerings.media
Classpublic class ScalingMediaContainer
InheritanceScalingMediaContainer Inheritance MediaContainer Inheritance flash.display.Sprite



Public Properties
 PropertyDefined by
  maxH : int
ScalingMediaContainer
  maxW : int
Publicly available, but do not change.
ScalingMediaContainer
Protected Properties
 PropertyDefined by
  _center : Boolean
ScalingMediaContainer
 Inherited_h : int
The unscaled height of our content.
MediaContainer
 Inherited_initialized : Boolean
If we're using a Loader, true once the INIT event has been dispatched.
MediaContainer
 Inherited_isImage : Boolean
Are we displaying an image?
MediaContainer
 Inherited_media : DisplayObject
Either a Loader or a VideoDisplay.
MediaContainer
  _mediaScale : Number = 1
ScalingMediaContainer
 Inherited_url : String
The unaltered URL of the content we're displaying.
MediaContainer
 Inherited_w : int
The unscaled width of our content.
MediaContainer
Public Methods
 MethodDefined by
  
ScalingMediaContainer(maxWidth:int, maxHeight:int, center:Boolean = true)
ScalingMediaContainer
 Inherited
containerDimensionsUpdated(newWidth:Number, newHeight:Number):void
Called by MediaWrapper as notification that its size has changed.
MediaContainer
 Inherited
Get the height of the content, bounded by the maximum.
MediaContainer
 Inherited
Get the width of the content, bounded by the maximum.
MediaContainer
 Inherited
Get the maximum allowable height for our content.
MediaContainer
 Inherited
Get the maximum allowable width for our content.
MediaContainer
 Inherited
getMedia():DisplayObject
Get the media.
MediaContainer
  
getMediaScaleX():Number
ScalingMediaContainer
  
getMediaScaleY():Number
ScalingMediaContainer
 Inherited
hitTestPoint(x:Number, y:Number, shapeFlag:Boolean = false):Boolean
Note: This method is NOT used in normal mouseOver calculations.
MediaContainer
 Inherited
Return true if the content has been initialized.
MediaContainer
 Inherited
setMedia(url:String):void
Configure the media to display.
MediaContainer
 Inherited
setMediaBytes(bytes:ByteArray):void
Set the media to display as a ByteArray.
MediaContainer
 Inherited
setMediaClass(clazz:Class):void
Configure our media as an instance of the specified class.
MediaContainer
 Inherited
setMediaObject(disp:DisplayObject):void
Configure an already-instantiated DisplayObject as our media.
MediaContainer
 Inherited
setShutdownOnRemove(enable:Boolean = true):void
Sets whether this MediaContainer automatically shuts down when removed from the stage.
MediaContainer
 Inherited
shutdown(completely:Boolean = true):void
Unload the media we're displaying, clean up any resources.
MediaContainer
 Inherited
toString():String
MediaContainer
Protected Methods
 MethodDefined by
 Inherited
addListeners(info:LoaderInfo):void
Add our listeners to the LoaderInfo object.
MediaContainer
 Inherited
configureMask(rect:Rectangle):void
Configure the mask for this object.
MediaContainer
  
ScalingMediaContainer
 Inherited
createVideoUI(player:VideoPlayer):DisplayObject
Create the actual display for the VideoPlayer.
MediaContainer
 Inherited
A place where subclasses can configure things after we've setup new media.
MediaContainer
 Inherited
getContext(url:String):LoaderContext
Return the LoaderContext that should be used to load the media at the specified url.
MediaContainer
 Inherited
getMaskRectangle():Rectangle
Get the mask area, or null if no mask is needed.
MediaContainer
 Inherited
getSecurityDomain(imageURL:String):SecurityDomain
Return the security domain to use for the specified image url.
MediaContainer
 Inherited
handleComplete(event:Event):void
Callback function to receive COMPLETE events for swfs or images.
MediaContainer
 Inherited
handleError(event:ErrorEvent):void
A callback to receive IO_ERROR and SECURITY_ERROR events.
MediaContainer
 Inherited
handleInit(event:Event):void
Handles the INIT event for content loaded with a Loader.
MediaContainer
 Inherited
handleProgress(event:ProgressEvent):void
A callback to receive PROGRESS events.
MediaContainer
 Inherited
handleShutdownOnRemove(event:Event):void
Handle shutting us down when we're removed.
MediaContainer
 Inherited
initLoader():Loader
Initialize a Loader as our _media, and configure it however needed to prepare loading user content.
MediaContainer
 Inherited
isImage(url:String):Boolean
Does the specified url represent an image?
MediaContainer
 Inherited
removeListeners(info:LoaderInfo):void
Remove our listeners from the LoaderInfo object.
MediaContainer
 Inherited
setupBrokenImage(w:int = -1, h:int = -1):void
Display a 'broken image' to indicate there were troubles with loading the media.
MediaContainer
 Inherited
setupSwfOrImage(url:String):void
Configure this sprite to show an image or flash movie.
MediaContainer
 Inherited
setupVideo(url:String):void
Configure this sprite to show a video.
MediaContainer
 Inherited
showNewMedia(url:String):void
MediaContainer
 Inherited
Do whatever is necessary to shut down the media.
MediaContainer
 Inherited
Called when we've started loading new media.
MediaContainer
 Inherited
Called when we've stopped loading, which may be as a result of completion, an error while loading, or early termination.
MediaContainer
 Inherited
updateContentDimensions(ww:int, hh:int):void
Called during loading as we figure out how big the content we're loading is.
MediaContainer
 Inherited
updateLoadingProgress(soFar:Number, total:Number):void
Update the graphics to indicate how much is loaded.
MediaContainer
 Inherited
A place where subclasses can initialize things prior to showing new media.
MediaContainer
Events
 EventSummaryDefined by
 Inherited Dispatched when we've shown new media.MediaContainer
 Inherited Dispatched when we've initialized our content.MediaContainer
 Inherited Dispatched when the size of the media being loaded is known.MediaContainer
 Inherited Dispatched when we've unloaded our content...MediaContainer
Public Constants
 ConstantDefined by
 InheritedSIZE_KNOWN : String = "mediaSizeKnown"
[static] A ValueEvent we dispatch when our size is known.
MediaContainer
Protected Constants
 ConstantDefined by
 Inheritedlog : Log
[static] A log instance that can be shared by sprites.
MediaContainer
Property detail
_centerproperty
protected var _center:Boolean
maxHproperty 
public var maxH:int
maxWproperty 
public var maxW:int

Publicly available, but do not change.

_mediaScaleproperty 
protected var _mediaScale:Number = 1
Constructor detail
ScalingMediaContainer()constructor
public function ScalingMediaContainer(maxWidth:int, maxHeight:int, center:Boolean = true)

Parameters
maxWidth:int — if true, the actual media will be centered within the maximum size if it is smaller in either dimension.
 
maxHeight:int
 
center:Boolean (default = true)
Method detail
contentDimensionsUpdated()method
protected override function contentDimensionsUpdated():void
getMediaScaleX()method 
public override function getMediaScaleX():Number

Returns
Number
getMediaScaleY()method 
public override function getMediaScaleY():Number

Returns
Number