The reason that the _onDblClick event works is that it is bound to the elements of the Timeline band directly. It knows what object to scroll through the "this" variable.
You just need to make sure that your Timeline is getting created correctly and that you have a global reference to it available to your forward/backward buttons. You don't need the "javascript:" in the onclick handler, so you can take that out. onclick="avancaTimeline(500);" will do just fine. Try onclick="alert(tl);" You should get "[object Object]" You said your timeline div was: > <div id="stl-mytimeline"><?php stl_simile_timeline(); ?></div> I'd guess that the php function stl_simile_timeline() might be the cause of the problem here. What does the output of this function look like? --Mike On Apr 27, 2010, at 2:49 PM, Marcos Mendes wrote: > Thank you Michael, > > Unfortunately at the moment I can not offer an online version. (Even > though it would help a lot). > > Had realized that "tl" for some reason was not being introduced to the > scope, even trying to "tl" (var tl ... create ...) could succeed on > its own page in Firefox, but still have the same problem in internet > explorer when I have the result above I get "tl is undefined." > > Is there anything I can do to circumvent this problem in IE? > > > NOTE: > > I noticed that the double click function works fine in IE: > > > Timeline._Band.prototype._onDblClick = function (innerFrame, evt, > target) ( > var coords = SimileAjax.DOM.getEventRelativeCoordinates (evt, > innerFrame); > var distance = coords.x - (this._viewLength / 2 - > this._viewOffset); > > this._autoScroll (-distance); > ); > > > My purpose, as I mentioned above is just two buttons to the controller > to scroll the timeline, one in the right corner, another on the left. > > > Could I use it somehow as an action to the buttons without referring > to the so problematic "tl"? > > > > Thank you. > > - marcos mendes > > -- > You received this message because you are subscribed to the Google Groups > "SIMILE Widgets" 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/simile-widgets?hl=en. > -- You received this message because you are subscribed to the Google Groups "SIMILE Widgets" 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/simile-widgets?hl=en.
