I'm looking for way that I can display upcoming show dates on a musician friend's website.
The program I'm using can display data from an XML file, but I'm wondering how to script it so it will show the next 3 dates and not including the one on the current date, and continue down the list that way to the end.
Ok - this should be rather simple - can you post your FLA and XML? I've done many tickers like this before, basically you need to just repeat the nodes in your XML. Let me know...
I'm a bit confused... what's an Amara program? If you're not using flash, it's difficult to help you with your situation. I would suggest you visit www.flashden.net and searching for tickers - plenty of them to choose from (and purchase). If you need help modifying, this is the place to come.
OK - so your source code was compiled - not much I can do with that. However, you should be able to just duplicate the nodes within your XML. Let me know if that works.
PHP Code:
<?xml version="1.0" encoding="UTF-8" ?>
- <newsticker imagePath="">
- <item>
<title>Shine Pink</title>
</item>
- <item>
<title>Google Earth</title>
</item>
- <item>
<title>More to Mac sales than a halo effect</title>
</item>
- <item>
<title>Wal-Mart plays Black Friday spoilsporte</title>
</item>
- <item>
<title>Shine Pink ( čćšđž )</title>
</item>
- <item>
<title>Your title goes here</title>
</item>
- <item>
<title>Endeavor Laptops</title>
</item>
- <item>
<title>Me on TV</title>
</item>
//-----------------------
<item>
<title>Shine Pink2</title>
</item>
- <item>
<title>Google Earth2</title>
</item>
- <item>
<title>More to Mac sales than a halo effect2</title>
</item>
- <item>
<title>Wal-Mart plays Black Friday spoilsporte2</title>
</item>
- <item>
<title>Shine Pink ( čćšđž )2</title>
</item>
- <item>
<title>Your title goes here2</title>
</item>
- <item>
<title>Endeavor Laptops2</title>
</item>
- <item>
<title>Me on TV2</title>
</item>
Dates should scroll right to left. Is that why you're trying to use? Maybe you should get the ticker running online somewhere, configure the XML with the dates and everything, then in detail, try to explain what you'd like to modify.
You're right. Maybe I didn't explain it better, so let me try.
What I need to do is this:
Let's say I have a list of 100 or so tour dates. I want the newsticker to scroll the next three dates on the front page. Just the next three upcoming dates. I don't want to show all 100 dates on the front page.
For example, if today's July 1st, I want it to show the following dates on the scroller:
July 1st - Atlanta
July 3rd - Cincinnati
July 5th - Pittsburgh
The scroller would not show the June 31st, because the date has passed. I hope this explains it better than I did earlier. Can the XML file be scripted to do this?
XML is JUST a place to store data... its just a bunch of DATA.. it does nothing.. think of it as a text file really (with some formatting)
what you DO with the data is up to you... that would be handled on the CODE side..
and Im sure this is possible... you'd have to use a combination of the DATA class to get todays date..
store todays date in a VAR..
load yoru XML... load ALL tour dates and data into an ARRAY (object array maybe)
and loop through your array..checking for todays DATE in that ARRAY.. once found.. stop/break out of your loop..
get the INDEX where your todays date matched the date in the array.. and then use that INDEX# as your starting point in the array.. and grab the next 3 values in the ARRAY/INDEX
Yes, that's what I'm wanting to avoid, because that would suck bad.
Any suggestions as to where I can get a script as mentioned?
Well like Whispers mentioned earlier - I don't think you'll be able to get this done with XML alone. You'll need some sort of time funciton built into flash IE: if date = June, 3, 2008 then display node 1.
Personally I have no idea where to go with this as I have played with Time & Dates quite yet.
You may want to check out the examples at: www.flashden.net - see if there's anything similar to what you're looking for. It's a great way to learn.
I can try to throw together a quick demo if I get some time tonight.. (just gotta remember...LOL)
also.. how is this supposed to work? you put a whole months, years worht od dates in the XML..but now matter what DATE it is... it will ONLY show the next 3 dates (nodes)?