Added hook for subclasses to initialize things prior to loading a new
piece of media. git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@209 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
@@ -119,6 +119,7 @@ public class MediaContainer extends Sprite
|
||||
}
|
||||
|
||||
// set up the new media
|
||||
willShowNewMedia();
|
||||
if (StringUtil.endsWith(url.toLowerCase(), ".flv")) {
|
||||
setupVideo(url);
|
||||
|
||||
@@ -145,11 +146,21 @@ public class MediaContainer extends Sprite
|
||||
shutdown(false);
|
||||
}
|
||||
|
||||
willShowNewMedia();
|
||||
addChild(disp);
|
||||
_media = disp;
|
||||
updateContentDimensions(disp.width, disp.height);
|
||||
}
|
||||
|
||||
/**
|
||||
* A place where subclasses can initialize things prior to showing
|
||||
* new media.
|
||||
*/
|
||||
protected function willShowNewMedia () :void
|
||||
{
|
||||
// nada in here
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure this sprite to show a video.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user