Ok, great. Now, how can I get at the AnimationControl.prototype.play/stop code?
-----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Williams Sent: Sunday, September 28, 2008 8:47 PM To: [email protected] Subject: Re: FW: tile overlay animation & "phantom code on site" question This is the code that it uses for adding a "mousedown" listener to the "playpause" element general.addListener( 'playpause', 'mousedown', function (evt) { SWMap.animationControl.playPauseControl(); YAHOO.util.Event.preventDefault(evt); return false; } ); That "addListener" method is provided by the Yahoo API. [I don't see any real need for all that. A simple onclick="SWMap.animationControl.playPauseControl()" in the HTML would probably have achieved much the same effect.] playPauseControl() looks like this: /* handler for clicking the play/pause button */ AnimationControl.prototype.playPauseControl = function () { if (this.paused) { if (this.currentType === 'off') { mapGeneral.centerAndZoomOnRegionAnimation(null, null, null, true); // play after move } else { this.play(true); } } else { this.stop(); } }; Which invokes the main animation routines AnimationControl.prototype.play() AnimationControl.prototype.stop() -- http://econym.org.uk/gmap The Blackpool Community Church Javascript Team --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Maps-API?hl=en -~----------~----~----~----~------~----~------~--~---
