Merge pull request #106 from tomhughes/master
authorRichard Fairhurst <richard@systemeD.net>
Tue, 20 Aug 2013 11:22:20 +0000 (04:22 -0700)
committerRichard Fairhurst <richard@systemeD.net>
Tue, 20 Aug 2013 11:22:20 +0000 (04:22 -0700)
Allow the paths for introduction.{jpg,mp4} to be overridden

net/systemeD/potlatch2/help/HelpDialog.mxml

index d774414..cbd31c6 100644 (file)
         return "<p>If you feel confident with your edits, hit save to publish to <a href=\"http://www.openstreetmap.org\" target=\"_blank\">http://www.openstreetmap.org</a>. Most edits take a few hours to show up on OSM.</p>"
     }
 
+    private function getIntroImage():String {
+        var intro_image:String = loaderInfo.parameters["intro_image"];
+        return intro_image ? intro_image : "help/introduction.jpg";
+    }
+
+    private function getIntroVideo():String {
+        var intro_video:String = loaderInfo.parameters["intro_video"];
+        return intro_video ? intro_video : "help/introduction.mp4";
+    }
+
     private function buildGrid(text:Array):Grid {
         var grid:Grid = new Grid()
         grid.percentWidth=100;
 
     <mx:VBox id="introduction" 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" />
+                       file="{getIntroVideo()}"
+                       previewImage="{getIntroImage()}" />
        </mx:VBox>
 
     <mx:VBox id="Controls" label="Controls" width="100%" height="100%">