embed tutorial video in help dialogue
authorRichard Fairhurst <richard@systemed.net>
Fri, 18 Feb 2011 08:49:05 +0000 (08:49 +0000)
committerRichard Fairhurst <richard@systemed.net>
Fri, 18 Feb 2011 08:49:05 +0000 (08:49 +0000)
net/systemeD/potlatch2/help/HelpDialog.mxml
net/systemeD/potlatch2/help/VideoPlayer.mxml

index 8e488ed0b58758c09bc9f3f2d6b9375065946f9b..fa44bd645b154adf3ed98b91147ce461bfdd6745 100644 (file)
@@ -4,7 +4,7 @@
         xmlns:help="net.systemeD.potlatch2.help.*"
         layout="vertical" showCloseButton="true"
         horizontalAlign="center" title="{getTitleText()}"
-        width="600" height="500"
+        width="660" height="500"
         verticalGap="0">
   <mx:Script><![CDATA[
     import mx.managers.PopUpManager;
         </mx:GridRow>
       </mx:Grid>
     </mx:VBox>
+
+    <mx:VBox label="Introduction" width="100%" height="100%" hide="introvideo.stopPlaying()" removedFromStage="introvideo.stopPlaying()">
+               <help:VideoPlayer width="640" height="369" id="introvideo"
+                       file="help/introduction.mp4" 
+                       previewImage="help/introduction.jpg" />
+       </mx:VBox>
+
     <mx:VBox label="Controls" width="100%" height="100%">
       <mx:Label text="Interface Controls" textAlign="center" width="100%" styleName="helpPageHeader"/>
       <mx:Grid width="100%">
index 4508cf2d5c924949b2f9c3e96a77fb5dd31cae5c..866b0561e2bacb1781f928486a3c0a7d81bcd611 100644 (file)
@@ -7,7 +7,7 @@
                </mx:Box>
                <mx:Box id="videoContainer">
                        <mx:VideoDisplay id="video" 
-                               metadataReceived="prepareVideo()"
+                               metadataReceived="prepareVideo()"
                                click="playVideo()"
                                autoPlay="false"
                                width="100%" height="100%" />
                        public function progressThumbRelease(event:Event):void { 
                                video.playheadTime = event.currentTarget.value; 
                        } 
+                       public function stopPlaying():void {
+                               if (!video.playing) return;
+                               video.pause();
+                               playButton.source=playImage;
+                       }
 
                ]]> 
        </mx:Script>