]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
dynamic loading of images, can still override with new image in xml. overlay fade...
authorScottDowne <sdowne@learn.senecac.on.ca>
Tue, 6 Jul 2010 16:06:09 +0000 (12:06 -0400)
committerScottDowne <sdowne@learn.senecac.on.ca>
Tue, 6 Jul 2010 16:06:09 +0000 (12:06 -0400)
images/overlay/location.png [moved from images/overlay/googlemap.png with 100% similarity]
images/overlay/wiki.png [moved from images/overlay/wikipedia.png with 100% similarity]
popcorn.js
xml/webMadeMovies.xml

index 49f5671923f40faffdad27682c20d730d643c696..90f1552030c3f4edf4d407dc111329d88f5be685 100644 (file)
     }
     
     // Checks for a url of an image to overlay onto the video
+    if (!this.params.overlay) {
+      this.params.overlay = "images/overlay/" + name + ".png";
+    }
+    
     if (this.params.overlay) {
       this.image = document.createElement('img');
       var that = this;
         .append($(that.image)
         .attr("src",that.params.overlay)
         .attr("style", "display:none")).appendTo(VideoManager.overlayDiv);
-      
-      this.displayOverlay = function() {
-        this.image.setAttribute('style', 'display:inline');
-      };
-      this.removeOverlay = function() {
-        this.image.setAttribute('style', 'display:none');
-      };
     }
 
     if (!VideoCommand.active[this.params.target]) {
       MapCommand.map.setCenter(new google.maps.LatLng(0, 0));
       MapCommand.map.setZoom(0);
     }
+      
+    this.displayOverlay = function() {
+      $(this.image).fadeIn(2000);
+    };
+    this.removeOverlay = function() {
+      $(this.image).fadeOut(2000);
+    };
     this.onIn = function() {
       MapCommand.map.setCenter(this.location);
       MapCommand.map.setZoom(this.params.zoom);
         behavior: 'default'
       }
     }).render().start();
+    this.displayOverlay = function() {
+      $(this.image).fadeIn(2000);
+    };
+    this.removeOverlay = function() {
+      $(this.image).fadeOut(2000);
+    };
     this.onIn = function() {
       this.target.setAttribute('style', 'display:inline');
     };
         }
       });
     });
+    this.displayOverlay = function() {
+      $(this.image).fadeIn(2000);
+    };
+    this.removeOverlay = function() {
+      $(this.image).fadeOut(2000);
+    };
     this.target = target;
 
     this.onIn = function() {
     }); 
     
     this.target = target;
+    this.displayOverlay = function() {
+      $(this.image).fadeIn(2000);
+    };
+    this.removeOverlay = function() {
+      $(this.image).fadeOut(2000);
+    };
     this.onIn = function() {
       this.target.setAttribute('style', 'display:inline');
     };
 
   var FootnoteCommand = function(name, params, text, videoManager) {
     VideoCommand.call(this, name, params, text, videoManager);
+    this.displayOverlay = function() {
+      $(this.image).fadeIn(2000);
+    };
+    this.removeOverlay = function() {
+      $(this.image).fadeOut(2000);
+    };
     this.onIn = function() {
       //if the user specifies a target div for this in the xml use it
       //otherwise make a new div 
index ed5d3b4b5459a9acdd6cf10d54bdaf67c5cdf4f8..514e17e4c4ea5ca93a6da4a3e211d49df994d8db 100644 (file)
@@ -91,9 +91,9 @@
       <videotag in="00:00:05:02" out="00:00:10:07">Steve Song</videotag>
       <attribution in="00:00:05:02" out="00:00:10:07" target="container5" resourceid="villagetelcoattrib"></attribution>
       <twitter in="00:00:05:02" out="00:00:10:07" title="Steve Song" source="from:stevesong" target="personaltwitter" width="238" height="120" overlay="images/overlay/twitter.png" />
-      <wiki in="00:00:05:02" out="00:00:10:07" resourceid="villagetelco" numberOfWords="200" target="wikidiv" overlay="images/overlay/wikipedia.png"/>
+      <wiki in="00:00:05:02" out="00:00:10:07" resourceid="villagetelco" numberOfWords="200" target="wikidiv" overlay="images/overlay/wiki.png"/>
       <flickr in="00:00:05:02" out="00:00:10:07" target="personalflickr" userid="78868639@N00" numberofimages="8" padding="4px" overlay="images/overlay/flickr.png"/>
-      <googlenews in="00:00:05:02" out="00:00:10:07" target="googlenewsdiv" topic="Village Telco" overlay="images/overlay/googlemap.png"/>
+      <googlenews in="00:00:05:02" out="00:00:10:07" target="googlenewsdiv" topic="Village Telco"/>
 
       <twitter in="00:00:10:07" out="00:00:18:04" title="Oil Spill" source="#oilspill" target="twitter" width="238" height="120"/>
       <googlenews in="00:00:10:07" out="00:00:18:04" target="googlenewsdiv" topic="Oil Spill"/>