HEX
Server: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/8.4.25
System: Windows NT DESKTOP-4TAV2RJ 10.0 build 19045 (Windows 10) AMD64
User: fred (0)
PHP: 8.4.25
Disabled: NONE
Upload Files
File: C:/xampp/htdocs/PDFlib91/bind/data/minivid.mxml
<?xml version="1.0"?>
<!--
        Minimal video player created with Flex.
        
        Flash variables:
        
        title   Title to display above the video

        source  URL of the video to play (can be relative or absolute)
        
        autoplay        whether to turn autoplay on or off ("true" or "false")
-->

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
    xmlns:mx="library://ns.adobe.com/flex/mx" 
    xmlns:s="library://ns.adobe.com/flex/spark"
    creationComplete="init();">
    <fx:Script>
        <![CDATA[
            import mx.core.FlexGlobals;
            import mx.controls.Alert;
            import mx.events.CuePointEvent;
            import org.osmf.events.MediaPlayerStateChangeEvent;

            [Bindable]
            public var myTitle:String;
            
            private function cp_listener(eventObject:CuePointEvent):void {
                 ExternalInterface.call("multimedia_cuePoint",
                                eventObject.cuePointName,
                                eventObject.cuePointType,
                                eventObject.cuePointTime);
            }
            
            private function init():void {
                myTitle = FlexGlobals.topLevelApplication.parameters.title;
                if (myTitle == null)
                    myTitle = "Video Player";

                player.autoPlay = (FlexGlobals.topLevelApplication.parameters.autoplay == "true");
                player.source = FlexGlobals.topLevelApplication.parameters.source;
                
                ExternalInterface.addCallback("play", play);
                ExternalInterface.addCallback("stop", stop);
                ExternalInterface.addCallback("pause", pause);
                ExternalInterface.addCallback("mute", mute);
                ExternalInterface.addCallback("rewind", rewind);
                ExternalInterface.addCallback("volume", volume);
            }
            
            private function play():void { player.play(); }
            private function stop():void { player.stop(); }
            private function pause():void { player.pause(); }
            private function mute():void { player.volume = 0; }
            private function volume(value:Number):void { player.volume = value; }
            private function rewind():void { player.playheadTime = 0; }
        ]]>
    </fx:Script>

    <s:Panel title="{myTitle}" fontWeight="bold" fontSize="24"
                width="100%" height="100%">
        <mx:VideoDisplay id="player" autoRewind="false"
                width="100%" height="100%" cuePoint="cp_listener(event);"/>
    </s:Panel>
</s:Application>