Hi Fred,

The way I did this was with a second XML data file and eventSource 
object.  Some of my bands use a very detailed XML file.  A "summary" 
band uses an abbreviated data file.

So, you have it right.  You just have to use separate eventSource objects 
so that you do not delete the previously loaded data by calling loadXML() 
on the same instance of the eventSource Object again. You need to make an 
eventSource(actor) object and an (actor)_data.xml for each band that you 
want to have in your timeline.

In my case the timeline is of a musical performer and the detailed bands 
include each individual concert.  While, the abbreviated band only 
includes major events such as a Album Release.

Here is a link to that example:

http://cryptnet.net/people/vab/influences/jewel/jewel_kilcher_timeline/

Here is the specific code:

Timeline.loadXML("jewel_kilcher.xml", function(xml, url) { 
eventSource.loadXML(xml, url); });
        Timeline.loadXML("jewel_kilcher_full.xml", function(xml, url) { 
eventSourceFull.loadXML(xml, url); });

Timeline.createBandInfo({
                        eventSource:    eventSourceFull,
                        (...)
}
Timeline.createBandInfo({
                        eventSource:    eventSource,
                        (...)
}

eventSourceFull (detailed bands):

http://cryptnet.net/people/vab/influences/jewel/jewel_kilcher_timeline/jewel_kilcher_full.xml

eventSource (summary bands):

http://cryptnet.net/people/vab/influences/jewel/jewel_kilcher_timeline/jewel_kilcher.xml


    - VAB


On Fri, 11 May 2007, Fred Rowley wrote:

> I'd like to develop a timeline such that each band represents a different 
> actor, with its own set of events -- the idea being that instead of a band 
> representing a different time scale, it represents a different actor in the 
> same time scale.
>
> Perhaps there are multiple ways to accomplish this, but one thought I had was 
> to create multiple timelines, then load each with different data sources -- 
> like this in the OnLoad event:
>
>  tl = Timeline.create(document.getElementById("my-timeline"), bandInfos);
>  tl.loadXML("example2.xml", function(xml, url) { eventSource.loadXML(xml, 
> url); });
>
>  tl2 = Timeline.create(document.getElementById("my-timeline2"), bandInfos);
>  tl2.loadXML("example1.xml", function(xml, url) { eventSource.loadXML(xml, 
> url); });
>
> This doesn't work -- both divs get a timeline, but only the second gets 
> loaded.
>
> Then I thought perhaps I could load different data into each band - but I'm 
> not seeing a way to accomplish that.
>
> Anyone have any thoughts?
>
> thanks a lot - pretty cool timeline!
>
> Fred Rowley - Seattle
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general

Reply via email to