View Full Version : xml Event Driven Timeline in Flash

02-19-2009, 04:38 PM
xml Event Driven Timeline in Flash


What I need is a starting point to make an actual timeline (with points representing an event that happened on a certain date) These points are plotted on a y axis with tic marks and years.

The information for the points of the timeline need to be pulled from an .xml file

Also I am doing this for several different brands that have different founding dates, so the actionscript needs to be able to determine how many years the brand has been around and create an appropriately sized timeline.

So far I have this script that creates a y axis with tick marks:

//_root.lineStyle(5, 0xFF00FF, 100); _root.moveTo(10,30); _root.lineTo(30,50);
var numOfvertLines = 1;
var vertStartPointX = 75;
var vertStartPointY = 0;
var vertFinPointX = 75;
var vertFinPointY = 410;
while (numOfvertLines<=1) {
_root.lineStyle(2, 0x000000, 100);
_root.moveTo(vertStartPointX, vertStartPointY);
_root.lineTo(vertFinPointX, vertFinPointY);
vertStartPointX += 20;
//vertStartPointY = 5;
vertFinPointX += 20;
//vertFinPointY = 375;
var numOfHoriLines = 1;
var HoriStartPointX = 70;
var HoriStartPointY = 5;
var HoriFinPointX = 80;
var HoriFinPointY = 5;
while (numOfHoriLines<=21) {
_root.lineStyle(2, 0x000000, 100);
_root.moveTo(HoriStartPointX, HoriStartPointY);
_root.lineTo(HoriFinPointX, HoriFinPointY);
//HoriStartPointX += 20;
HoriStartPointY += 20;
//HoriFinPointX += 20;
HoriFinPointY += 20;

and this script that finds the current year so I can subtract that from the founding date of the brand:

var date=new Date();

var year=date.getFullYear();


Please help, I am really spinning my wheels on this one.

02-23-2009, 01:57 PM

02-26-2009, 01:37 PM