- On "stop": if "playing" cancel autoswitch; break "playing".
- On "start show": set up things; set "playing" state; show needed image.
- On "stop show": cancel any schedules, hide things.
+ - On resize: recalculate existing image size and position; determine
+ what image is needed; if it is not the one on display then request
+ "show image" for the new image.
*/
var Show = new Class({
getOptions: function(){
return {
- onClick: $empty,
+ cbStart: function(){ alert('show start undefined'); },
+ cbExit: function(){ alert('show exit undefined'); },
}
},
this.controls.registershow(this);
window.addEvent('resize', this.resizer.bind(this))
- window.addEvent('scroll', this.scroller.bind(this))
},
+ /* event handler for window resize */
+
resizer: function(){
alert('show.resizer called');
},
- scroller: function(){
- alert('show.scroller called');
+ /* prev, play, stop, next, exit, comm are methods for button presses */
+
+ prev: function(){
+ this.controls.info(-1,this.vimgs.length,
+ '<ref>','prev called');
+ },
+
+ stop: function(){
+ this.controls.info(0,this.vimgs.length,
+ '<ref>','stop called');
+ this.controls.running(0);
+ },
+
+ play: function(){
+ this.controls.info(999,this.vimgs.length,
+ '<ref>','play called');
+ this.controls.running(1);
+ },
+
+ next: function(){
+ this.controls.info(1,this.vimgs.length,
+ '<ref>','next called');
},
+ exit: function(){
+ this.options.cbExit();
+ },
+
+ comm: function(){
+ /* alert('show.comm called, do nothing'); */
+ },
+
+ /* Entry point: called to start doing things */
+
+ start: function(id, play){
+ this.options.cbStart();
+ alert('starting at '+id+', play='+play);
+ /* real job here */
+ return false; /* to make it usable from href links */
+ },
+
+ /* "Private" methods to do the real job */
+
});
Show.implement(new Options);
+Show.implement(new Events);