}
private function getIntroText():String {
- var site_name:String = loaderInfo.parameters["site_name"];
+ var site_name:String = loaderInfo.parameters["site_name"] || "OpenStreetMap";
var browser:String = String(ExternalInterface.call("function() {return navigator.userAgent;}")).toLowerCase();
var intro:String = '';
if (site_name=='OpenStreetMap' && browser.indexOf('msie')==-1) {
intro+="<p><font size='+4' color='#FF0000'><b>New user?</b> There's now an easier first-time editor you can try instead of this. Click the triangle by the Edit menu and select 'iD'.</font></p>";
}
- intro+="<p><b>Potlatch 2</b> is an intermediate-level OpenStreetMap (OSM) editor that allows you to make edits directly through ";
- if (site_name) { intro+="the " + site_name + " website.</p>"; }
- else { intro+="this website.</p>"; }
+ intro+="<p><b>Potlatch 2</b> is an intermediate-level OpenStreetMap (OSM) editor that allows you to make edits directly through the " + site_name + " website.</p>";
return intro;
}
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%">