Separate Halcyon (rendering) into standalone target without Flex dependency; JavaScri...
authorRichard Fairhurst <richard@systemed.net>
Thu, 16 Jul 2009 15:00:10 +0000 (15:00 +0000)
committerRichard Fairhurst <richard@systemed.net>
Thu, 16 Jul 2009 15:00:10 +0000 (15:00 +0000)
45 files changed:
README.txt
halcyon.mxml
halcyon_viewer.as [new file with mode: 0755]
net/systemeD/halcyon/Map.as
net/systemeD/halcyon/POI.as
net/systemeD/halcyon/WayUI.as
net/systemeD/halcyon/connection/AMFConnection.as
net/systemeD/halcyon/connection/Connection.as
net/systemeD/halcyon/connection/Entity.as
net/systemeD/halcyon/connection/Node.as
net/systemeD/halcyon/connection/Relation.as
net/systemeD/halcyon/connection/Way.as
net/systemeD/halcyon/styleparser/TextStyle.as
resources/features/highway__motorway.png [moved from features/highway__motorway.png with 100% similarity]
resources/features/highway__residential.png [moved from features/highway__residential.png with 100% similarity]
resources/features/highway__service.png [moved from features/highway__service.png with 100% similarity]
resources/features/highway__trunk.png [moved from features/highway__trunk.png with 100% similarity]
resources/features/highway__unclassified.png [moved from features/highway__unclassified.png with 100% similarity]
resources/halcyon.html [new file with mode: 0644]
resources/icons/airport.png [moved from icons/airport.png with 100% similarity]
resources/icons/atm.png [moved from icons/atm.png with 100% similarity]
resources/icons/bar.png [moved from icons/bar.png with 100% similarity]
resources/icons/bus_stop.png [moved from icons/bus_stop.png with 100% similarity]
resources/icons/cafe.png [moved from icons/cafe.png with 100% similarity]
resources/icons/convenience.png [moved from icons/convenience.png with 100% similarity]
resources/icons/fast_food.png [moved from icons/fast_food.png with 100% similarity]
resources/icons/fire_station.png [moved from icons/fire_station.png with 100% similarity]
resources/icons/hospital.png [moved from icons/hospital.png with 100% similarity]
resources/icons/hotel.png [moved from icons/hotel.png with 100% similarity]
resources/icons/icons_grid.png [moved from icons/icons_grid.png with 100% similarity]
resources/icons/parking.png [moved from icons/parking.png with 100% similarity]
resources/icons/pharmacy.png [moved from icons/pharmacy.png with 100% similarity]
resources/icons/pharmacy_dispensing.png [moved from icons/pharmacy_dispensing.png with 100% similarity]
resources/icons/police.png [moved from icons/police.png with 100% similarity]
resources/icons/post_box.png [moved from icons/post_box.png with 100% similarity]
resources/icons/pub.png [moved from icons/pub.png with 100% similarity]
resources/icons/recycling.png [moved from icons/recycling.png with 100% similarity]
resources/icons/restaurant.png [moved from icons/restaurant.png with 100% similarity]
resources/icons/school.png [moved from icons/school.png with 100% similarity]
resources/icons/station.png [moved from icons/station.png with 100% similarity]
resources/icons/taxi.png [moved from icons/taxi.png with 100% similarity]
resources/icons/telephone.png [moved from icons/telephone.png with 100% similarity]
resources/map_features.xml [moved from map_features.xml with 100% similarity]
resources/swfobject.js [new file with mode: 0644]
resources/test.yaml [moved from test.yaml with 100% similarity]

index 7f79b1e..a5057c1 100644 (file)
@@ -1,8 +1,10 @@
-== Halcyon - ActionScript 3 renderer for Potlatch 2.0 ==
+== Halcyon and Potlatch 2.0 - ActionScript 3 renderer and editor ==
 
-Here's some embryonic unfinished stuff to play with.
+Potlatch 2.0 is the new version of the OpenStreetMap online editor.
 
-This is a live OSM renderer written in AS3 which will one day grow into a beautiful map editor. It's rules-based (like, say, Mapnik) and does dotted lines, text on a path, casing, icons for POIs, all of that.
+Halcyon is its rendering engine. It's rules-based (like, say, Mapnik) and does dotted lines, text on a path, casing, icons for POIs, all of that.
+
+Both are written in ActionScript 3. Potlatch 2.0 additionally uses the Flex framework.
 
 === What you'll need ===
 
@@ -15,10 +17,14 @@ This is a live OSM renderer written in AS3 which will one day grow into a beauti
 === How to compile and run ===
 
 Compiling:
+
 * fcsh
   - launches the Flex Compiler SHell
-* mxmlc -target-player=10.0.0 -managers=flash.fonts.AFEFontManager -output=/path/to/halcyon.swf /path/to/halcyon.mxml 
-  - compile for the first time
+
+* mxmlc -managers=flash.fonts.AFEFontManager -output=/path/to/halcyon.swf /path/to/halcyon.mxml 
+* mxmlc -managers=flash.fonts.AFEFontManager -output=/path/to/halcyon_viewer.swf /path/to/halcyon_viewer.as
+  - compile Potlatch or Halcyon for the first time
+
 * compile 1 
   - compile each subsequent time (_much_ faster than using mxmlc every time)
 
@@ -26,8 +32,9 @@ Compiling:
   mxmlc -managers=flash.fonts.AFEFontManager -compiler.debug -compiler.verbose-stacktraces -output=halcyon.swf halcyon.mxml
 
 Running:
-* Make sure test.yaml and icons/ are in the same directory as halcyon.swf
-* Open halcyon.swf in your browser
+
+* Move everything from the resources/ directory into the same directory as the SWF
+* Open halcyon.html or potlatch2.html in your browser
 
 === Some other stuff you might need to know ===
 
index 264a1fb..3afe610 100755 (executable)
@@ -10,7 +10,6 @@
 
       <mx:VBox height="100%" width="25%" horizontalAlign="right">
         <mx:HBox>
-          <mx:Button label="Export" click="theMap.export();"/>
           <mx:Button label="-" click="theMap.zoomOut();"/>
           <mx:Button label="+" click="theMap.zoomIn();"/>
         </mx:HBox>
@@ -48,7 +47,7 @@
                        _root.addChild(b);
 
                        // add map
-                       theMap=new Map();
+                       theMap=new Map(this.loaderInfo.parameters);
                        theMap.backdrop=b;
                        _root.addChild(theMap);
             theMap.updateSize(w, h);
@@ -87,7 +86,7 @@
 
                        // add debug field
                        var t:TextField=new TextField();
-                       t.width=400; t.height=100; t.border=true; 
+                       t.width=400; t.height=100; t.border=true;
                        t.multiline=true;
                        _root.addChild(t);
                        Globals.vars.debug=t;
diff --git a/halcyon_viewer.as b/halcyon_viewer.as
new file mode 100755 (executable)
index 0000000..36f7c50
--- /dev/null
@@ -0,0 +1,67 @@
+package {
+
+       import net.systemeD.halcyon.*;
+       import net.systemeD.halcyon.connection.*;
+       import flash.system.Security;
+       import flash.net.*;
+       import flash.events.*;
+       import flash.events.MouseEvent;
+       import flash.display.*;
+       import flash.text.TextField;
+
+       public class halcyon_viewer extends Sprite {
+
+               public var theMap:Map;
+
+               function halcyon_viewer():void {
+                       stage.align = StageAlign.TOP_LEFT;
+                       stage.scaleMode = StageScaleMode.NO_SCALE;
+                       this.loaderInfo.addEventListener(Event.COMPLETE, init);
+               }
+       
+               private function init(e:Event):void {
+
+                       // add debug field
+                       var t:TextField=new TextField();
+                       t.width=400; t.height=100; t.x=400; t.border=true;
+                       t.multiline=true;
+                       addChild(t);
+                       Globals.vars.debug=t;
+                       t.visible = true;
+
+                       theMap = new Map(this.loaderInfo.parameters);
+            theMap.updateSize(stage.stageWidth, stage.stageHeight);
+                       addChild(theMap);
+                       Globals.vars.root=theMap;
+
+                       stage.addEventListener(MouseEvent.MOUSE_UP, theMap.mouseUpHandler);
+                       stage.addEventListener(MouseEvent.MOUSE_MOVE, theMap.mouseMoveHandler);
+                       stage.addEventListener(MouseEvent.MOUSE_DOWN, theMap.mouseDownHandler);
+
+                       var z1:Sprite=new Sprite();
+                       z1.graphics.beginFill(0x0000FF); z1.graphics.drawRoundRect(0,0,20,20,5); z1.graphics.endFill();
+                       z1.graphics.lineStyle(2,0xFFFFFF);
+                       z1.graphics.moveTo(5,10); z1.graphics.lineTo(15,10);
+                       z1.graphics.moveTo(10,5); z1.graphics.lineTo(10,15);
+                       z1.x=5; z1.y=5; z1.buttonMode=true;
+                       z1.addEventListener(MouseEvent.CLICK, zoomInHandler, false, 1);
+                       addChild(z1);
+
+                       var z2:Sprite=new Sprite();
+                       z2.graphics.beginFill(0x0000FF); z2.graphics.drawRoundRect(0,0,20,20,5); z2.graphics.endFill();
+                       z2.graphics.lineStyle(2,0xFFFFFF);
+                       z2.graphics.moveTo(5,10); z2.graphics.lineTo(15,10);
+                       z2.x=5; z2.y=30; z2.buttonMode=true;
+                       z2.addEventListener(MouseEvent.CLICK, zoomOutHandler, false, 1);
+                       addChild(z2);
+
+                       if (this.loaderInfo.parameters.hasOwnProperty('responder')) {
+               var controller:JSController = new JSController(theMap, loaderInfo.parameters['responder']);
+                               controller.setActive();
+                       }
+               }
+               
+               private function zoomInHandler(e:MouseEvent):void  { e.stopPropagation(); theMap.zoomIn(); }
+               private function zoomOutHandler(e:MouseEvent):void { e.stopPropagation(); theMap.zoomOut(); }
+       }
+}
index 176039b..02229ff 100755 (executable)
@@ -6,16 +6,18 @@ package net.systemeD.halcyon {
        import flash.display.Shape;
        import flash.display.Stage;
        import flash.display.BitmapData;
+       import flash.display.LoaderInfo;
        import flash.utils.ByteArray;
        import flash.events.*;
-       import flash.net.FileReference;
        import flash.net.*;
 
     import net.systemeD.halcyon.connection.*;
     import net.systemeD.halcyon.connection.EntityEvent;
        import net.systemeD.halcyon.styleparser.*;
 
-       import com.adobe.images.JPGEncoder;
+//     for experimental export function:
+//     import flash.net.FileReference;
+//     import com.adobe.images.JPGEncoder;
 
     public class Map extends Sprite {
 
@@ -62,14 +64,16 @@ package net.systemeD.halcyon {
                private var lastxmouse:Number;                                  //  |
                private var lastymouse:Number;                                  //  |
                
+               public var initparams:Object;                                   // object containing 
+
                public var backdrop:Object;                                             // reference to backdrop sprite
                
-               public var connection:Connection;                       // server connection
+               public var connection:Connection;                               // server connection
 
                // ------------------------------------------------------------------------------------------
                // Map constructor function
 
-        public function Map() {
+        public function Map(initparams:Object) {
 
                        // Set up layering
                        // [layer][2]                   - names
@@ -90,7 +94,8 @@ package net.systemeD.halcyon {
                        s=getPaintSprite(); addChild(s);                        // 11 - POIs
                        s=getPaintSprite(); addChild(s);                        // 12 - shields and POI names
 
-                       connection= Connection.getConnection();
+                       this.initparams=initparams;
+                       connection = Connection.getConnection(initparams['api'],initparams['policy'],initparams['connection']);
             connection.addEventListener(Connection.NEW_WAY, newWayCreated);
             connection.addEventListener(Connection.NEW_POI, newPOICreated);
                        connection.getEnvironment(new Responder(gotEnvironment,connectionError));
@@ -104,15 +109,25 @@ package net.systemeD.halcyon {
         }
 
                public function gotEnvironment(r:Object):void {
-                       init(53.09465,-2.56495,17);
+                       if (initparams.hasOwnProperty('lat')) {
+                               // parameters sent from HTML
+                               init(initparams['lat'],
+                                        initparams['lon'],
+                                        initparams['zoom'],
+                                        initparams['style']);
+
+                       } else {
+                               // somewhere innocuous
+                               init(53.09465,-2.56495,17,"test.yaml?d="+Math.random());
+                       }
                }
 
                // ------------------------------------------------------------------------------------------
                // Initialise map at a given lat/lon
 
-        public function init(startlat:Number,startlon:Number,startscale:uint):void {
+        public function init(startlat:Number,startlon:Number,startscale:uint,style:String):void {
 
-                       ruleset.load("test.yaml?d="+Math.random());
+                       ruleset.load(style);
 //                     rules.initExample();            // initialise dummy rules
 
                        //updateSize();
@@ -227,6 +242,7 @@ package net.systemeD.halcyon {
         public function wayMouseEvent(event:MouseEvent, way:Way):void {
             if ( mapController != null )
                 mapController.entityMouseEvent(event, way);
+                               
         }
 
                // ------------------------------------------------------------------------------------------
@@ -270,7 +286,7 @@ package net.systemeD.halcyon {
                // really needs to take a bbox, and make sure that the image is correctly cropped/resized 
                // to that area (will probably require creating a new DisplayObject with a different origin
                // and mask)
-               
+/*             
                public function export():void {
                        addDebug("size is "+this.width+","+this.height);
                        var jpgSource:BitmapData = new BitmapData(800,800); // (this.width, this.height);
@@ -278,10 +294,10 @@ package net.systemeD.halcyon {
                        var jpgEncoder:JPGEncoder = new JPGEncoder(85);
                        var jpgStream:ByteArray = jpgEncoder.encode(jpgSource);
                        var fileRef:FileReference = new FileReference();
-                       fileRef.save(jpgStream,'map.jpeg');
+//                     fileRef.save(jpgStream,'map.jpeg');
                }
 
-
+*/
 
                // ==========================================================================================
                // Events
@@ -295,6 +311,7 @@ package net.systemeD.halcyon {
                }
         
                public function mouseUpHandler(event:MouseEvent):void {
+addDebug("up");
                        if (!dragging) { return; }
                        dragging=false;
                        updateCoords(x,y);
@@ -318,7 +335,7 @@ package net.systemeD.halcyon {
                        if (event.keyCode==73) { this.zoomIn(); }                       // I - zoom in
                        if (event.keyCode==79) { this.zoomOut(); }                      // O - zoom out
                        if (event.keyCode==76) { this.reportPosition(); }       // L - report lat/long
-                       if (event.keyCode==69) { this.export(); }                       // E - export
+//                     if (event.keyCode==69) { this.export(); }                       // E - export
                }
 
                public function connectionError(err:Object=null): void {
@@ -329,6 +346,8 @@ package net.systemeD.halcyon {
                // Debugging
                
                public function addDebug(text:String):void {
+                       if (!Globals.vars.hasOwnProperty('debug')) return;
+                       if (!Globals.vars.debug.visible) return;
                        Globals.vars.debug.appendText(text+"\n");
                        Globals.vars.debug.scrollV=Globals.vars.debug.maxScrollV;
                }
index 9deecba..f1e6a50 100644 (file)
@@ -22,8 +22,8 @@ package net.systemeD.halcyon {
                        antiAliasType: AntiAliasType.ADVANCED,
                        gridFitType: GridFitType.NONE
                };
-               [Embed(source="fonts/DejaVuSans.ttf", fontFamily="DejaVu", fontWeight="normal", mimeType="application/x-font-truetype")]
-               public static var DejaVu:Class;
+//             [Embed(source="fonts/DejaVuSans.ttf", fontFamily="DejaVu", fontWeight="normal", mimeType="application/x-font-truetype")]
+//             public static var DejaVu:Class;
 
                public function POI(node:Node, map:Map) {
                        this.map = map;
index be88475..48a0efc 100755 (executable)
@@ -29,8 +29,8 @@ package net.systemeD.halcyon {
                        antiAliasType: AntiAliasType.ADVANCED,
                        gridFitType: GridFitType.NONE
                };
-               [Embed(source="fonts/DejaVuSans.ttf", fontFamily="DejaVu", fontWeight="normal", mimeType="application/x-font-truetype")]
-               public static var DejaVu:Class;
+//             [Embed(source="fonts/DejaVuSans.ttf", fontFamily="DejaVu", fontWeight="normal", mimeType="application/x-font-truetype")]
+//             public static var DejaVu:Class;
                public var nameformat:TextFormat;
 
 
index 837af4a..0f75959 100755 (executable)
@@ -32,7 +32,7 @@ package net.systemeD.halcyon.connection {
                }
 
                override public function getEnvironment(responder:Responder):void {
-                       readConnection.call("getpresets",responder,"en");
+                       readConnection.call("getpresets",responder,null,"en");
                }
                
                override public function loadBbox(left:Number,right:Number,
index 73207ca..d4d13c1 100755 (executable)
@@ -13,7 +13,12 @@ package net.systemeD.halcyon.connection {
         protected static var policyURL:String = "http://127.0.0.1:3000/api/crossdomain.xml";
         protected static var apiBaseURL:String = "http://127.0.0.1:3000/api/0.6/";
 
-        public static function getConnection():Connection {
+        public static function getConnection(api:String,policy:String,conn:String):Connection {
+                       
+                       policyURL=policy;
+                       apiBaseURL=api;
+                       CONNECTION_TYPE=conn;
+                       
             if ( connectionInstance == null ) {
                 if ( CONNECTION_TYPE == "XML" )
                     connectionInstance = new XMLConnection();
@@ -23,6 +28,10 @@ package net.systemeD.halcyon.connection {
             return connectionInstance;
         }
 
+               public static function getConnectionInstance():Connection {
+            return connectionInstance;
+               }
+
                public function getEnvironment(responder:Responder):void {}
 
         // connection events
@@ -132,4 +141,3 @@ package net.systemeD.halcyon.connection {
 
 }
 
-
index 5aff1b5..cb6b742 100644 (file)
@@ -69,6 +69,10 @@ package net.systemeD.halcyon.connection {
             return copy;
         }
 
+               public function getType():String {
+                       return '';
+               }
+
     }
 
 }
index bf72633..d20f53d 100644 (file)
@@ -39,6 +39,10 @@ package net.systemeD.halcyon.connection {
         public static function lat2latp(lat:Number):Number {
             return 180/Math.PI * Math.log(Math.tan(Math.PI/4+lat*(Math.PI/180)/2));
         }
+
+               public override function getType():String {
+                       return 'node';
+               }
     }
 
 }
index 58cdc90..02fccdc 100644 (file)
@@ -2,6 +2,7 @@ package net.systemeD.halcyon.connection {
 
     public class Relation extends Entity {
         private var members:Array;
+               public static var entity_type:String = 'relation';
 
         public function Relation(id:Number, version:uint, tags:Object, members:Array) {
             super(id, version, tags);
@@ -32,6 +33,10 @@ package net.systemeD.halcyon.connection {
         public function removeMember(index:uint):void {
             members.splice(index, 1);
         }
+
+               public override function getType():String {
+                       return 'relation';
+               }
     }
 
 }
index e3e6333..2886b5b 100644 (file)
@@ -2,6 +2,7 @@ package net.systemeD.halcyon.connection {
 
     public class Way extends Entity {
         private var nodes:Array;
+               public static var entity_type:String = 'way';
 
         public function Way(id:Number, version:uint, tags:Object, nodes:Array) {
             super(id, version, tags);
@@ -37,6 +38,10 @@ package net.systemeD.halcyon.connection {
                public function isArea():Boolean {
                        return (nodes[0].id==nodes[nodes.length-1].id  && nodes.length>2);
                }
+
+               public override function getType():String {
+                       return 'way';
+               }
     }
 
 }
index eb2b2a5..056e87c 100644 (file)
@@ -23,7 +23,7 @@ package net.systemeD.halcyon.styleparser {
                public var sublayer:uint=0;
 
                public function getTextFormat():TextFormat {
-                       return new TextFormat(font_name   ? font_name : "DejaVu",
+                       return new TextFormat(font_name   ? font_name : "_sans",
                                                                  text_size   ? text_size : 8,
                                                                  text_colour ? text_colour: 0,
                                                                  font_bold   ? font_bold : false,
@@ -41,7 +41,7 @@ package net.systemeD.halcyon.styleparser {
                        var tf:TextField = new TextField();
                        var n:TextFormat = getTextFormat();
                        n.align = "center";
-                       tf.embedFonts = true;
+//                     tf.embedFonts = true;
                        tf.defaultTextFormat = n;
                        tf.text = a;
                        if (text_width) {
diff --git a/resources/halcyon.html b/resources/halcyon.html
new file mode 100644 (file)
index 0000000..5f16650
--- /dev/null
@@ -0,0 +1,35 @@
+<html>
+
+<!-- Halcyon example embed script -->
+
+<head>
+<title>Halcyon</title>
+<script type="text/javascript" src="swfobject.js"></script>
+</head>
+
+<body>
+
+<div id="map" style="width:800px; height: 600px; border: 1px solid black">
+</div>
+
+<script>
+
+       function respond(event,object,id,attr) {
+               alert (event+": "+object+" "+id+", highway="+attr['highway']);
+       }
+
+       var fo = new SWFObject("halcyon_viewer.swf?d="+Math.round(Math.random()*1000), "map", "100%", "100%", "9", "#FFFFFF");
+       fo.addVariable("lat",51.875);
+       fo.addVariable("lon",-1.482);
+       fo.addVariable("zoom",16);
+       fo.addVariable("api","http://www.openstreetmap.org/api/0.6/");
+       fo.addVariable("policy","http://www.openstreetmap.org/api/crossdomain.xml");
+       fo.addVariable("connection","AMF");
+       fo.addVariable("responder","respond");
+       fo.addVariable("style","test.yaml");
+       fo.write("map");
+
+</script>
+
+</body>
+</html>
similarity index 100%
rename from icons/atm.png
rename to resources/icons/atm.png
similarity index 100%
rename from icons/bar.png
rename to resources/icons/bar.png
similarity index 100%
rename from icons/cafe.png
rename to resources/icons/cafe.png
similarity index 100%
rename from icons/hotel.png
rename to resources/icons/hotel.png
similarity index 100%
rename from icons/police.png
rename to resources/icons/police.png
similarity index 100%
rename from icons/pub.png
rename to resources/icons/pub.png
similarity index 100%
rename from icons/school.png
rename to resources/icons/school.png
similarity index 100%
rename from icons/taxi.png
rename to resources/icons/taxi.png
similarity index 100%
rename from map_features.xml
rename to resources/map_features.xml
diff --git a/resources/swfobject.js b/resources/swfobject.js
new file mode 100644 (file)
index 0000000..e7edd42
--- /dev/null
@@ -0,0 +1,8 @@
+/**
+ * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
+ *
+ * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ */
+if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;
\ No newline at end of file
similarity index 100%
rename from test.yaml
rename to resources/test.yaml