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