topical media & game development
student-mashup-youtube-example-fullscreen.mx
student-mashup-youtube-example-fullscreen.mx
[swf]
flex
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
xmlns:controls="com.fxcomponents.controls.*">
<mx:Script>
<![CDATA[
private function toggleFullScreen(event:MouseEvent):void {
switch(stage.displayState) {
case "normal":
this.vd.displayState = StageDisplayState.FULL_SCREEN;
break;
case "fullScreen":
default:
stage.displayState = StageDisplayState.NORMAL;
break;
}
}
]]>
</mx:Script>
<controls:FXVideo id="vd" width="320" height="240" enableSmoothing="true" setDeblocking="1"
source="monkey.flv" videoControl="{this.vc}" x="100" y="100"/>
<mx:HBox id="vc" x="100" y="318" width="320" height="22" backgroundColor="#cccccc"
backgroundAlpha=".8">
<mx:Button id="toggle" label="toggle FS" click="toggleFullScreen(event)"/>
<mx:Button id="play" label="play again" click="vd.playheadTime=0;vd.play();" />
</mx:HBox>
</mx:Application>
(C) Æliens
04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.