diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/media9/files/players/VPlayer.mxml')
-rw-r--r-- | Master/texmf-dist/doc/latex/media9/files/players/VPlayer.mxml | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/Master/texmf-dist/doc/latex/media9/files/players/VPlayer.mxml b/Master/texmf-dist/doc/latex/media9/files/players/VPlayer.mxml index cc28466c8f2..6a18cd7f27c 100644 --- a/Master/texmf-dist/doc/latex/media9/files/players/VPlayer.mxml +++ b/Master/texmf-dist/doc/latex/media9/files/players/VPlayer.mxml @@ -1,16 +1,16 @@ <?xml version="1.0"?> <!-- --> -<!-- Adobe Flex 4 source file of VPlayer.swf, --> +<!-- Apache Flex 4 source file of VPlayer.swf, --> <!-- a FlashPlayer-10 compatible component for playing --> <!-- FLV and MP4/H.264 video files and streams. --> <!-- --> -<!-- version 20130301 --> +<!-- version 20130606 --> <!-- --> <!-- --> -<!-- The free Adobe Flex 4 SDK is required to compile --> +<!-- The free Apache Flex 4 SDK is required to compile --> <!-- this file. Get it from --> <!-- --> -<!-- http://www.adobe.com/products/flex/ --> +<!-- http://flex.apache.org/download-binaries.html --> <!-- --> <!-- and run --> <!-- --> @@ -19,7 +19,7 @@ <!-- on the command line. --> <!-- --> <!-- --> -<!-- Copyright (C) 2012 Alexander Grahn --> +<!-- Copyright (C) 2012-today Alexander Grahn --> <!-- --> <!-- This work may be distributed and/or modified under the --> <!-- conditions of the LaTeX Project Public License, either --> @@ -67,22 +67,20 @@ if(flashVars.stepping){stepping=flashVars.stepping} } - import flash.events.ProgressEvent; - private function progressHandler(event:ProgressEvent):void { + private function onProgress(event:ProgressEvent):void { if (event.bytesTotal) event.target.visible=true; else event.target.visible=false; } import org.osmf.events.MediaPlayerStateChangeEvent; import mx.controls.Alert; - private function stateChangeHandler(event:MediaPlayerStateChangeEvent):void { + private function onStateChange(event:MediaPlayerStateChangeEvent):void { vidComplete=false; if(event.state=='playbackError') Alert.show('Unable to play \''+event.target.source+'\'','Error'); } - import flash.events.KeyboardEvent; - private function keyDnHnd(e:KeyboardEvent):void { + private function onKeyDown(e:KeyboardEvent):void { switch(e.keyCode) { case 32: //space bar playPause(); @@ -140,7 +138,7 @@ } } - private function keyUpHnd(e:KeyboardEvent):void { + private function onKeyUp(e:KeyboardEvent):void { switch(e.keyCode) { case 37: //<-- case 39: //--> @@ -227,8 +225,8 @@ ExternalInterface.addCallback("setSource", setSource); ExternalInterface.addCallback("stepping", step); this.setFocus(); - this.addEventListener(KeyboardEvent.KEY_DOWN, keyDnHnd); - this.addEventListener(KeyboardEvent.KEY_UP, keyUpHnd); + this.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); + this.addEventListener(KeyboardEvent.KEY_UP, onKeyUp); this.addEventListener(Event.ENTER_FRAME, onEnterFrame); } ]]> @@ -245,7 +243,7 @@ autoPlay="{autoPlay}" autoRewind="false" loop="{loop}" mouseDown="if(stepping){vidDisp.play();}else{vidDisp.pause();}this.setFocus();" mouseUp="if(vidComplete) vidDisp.seek(0);if(!stepping){vidDisp.play();}" - mediaPlayerStateChange="stateChangeHandler(event);" + mediaPlayerStateChange="onStateChange(event);" complete="vidComplete=true;" durationChange="if(vidDisp.autoPlay) vidDisp.play(); else vidDisp.seek(0);" /> @@ -254,7 +252,7 @@ horizontalCenter="0" bottom="0" labelPlacement="center" id="loadingProgress" alpha="0.5" complete="loadingProgress.visible=false;" - progress="progressHandler(event)" + progress="onProgress(event)" /> <mx:ProgressBar width="100%" mode="manual" horizontalCenter="0" bottom="0" labelPlacement="center" |