lo salvo in versione mx allora !
sorgente versione 8
codice:
function itemPos()
{
newX = newX + itemWidth;
timeLine["smsItem" + j]._x = newX;
timeLine["smsItem" + j]._visible = true;
itemWidth = timeLine["smsItem" + j]._width;
++j;
updateAfterEvent();
} // End of the function
function makeMenu()
{
newX = 0;
itemWidth = 0;
j = 0;
menuMake = setInterval(function ()
{
j < maxItems ? (itemPos()) : (clearInterval(menuMake));
}, 20);
timeLine._parent.startScroll();
} // End of the function
stop ();
timeLine = this;
mSmsTxt._visible = false;
var myDate = new Date();
myTime = myDate.getTime();
var xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.load("http://www.xxxxxxxxx.com/ms2_xml.php?"+myTime);
xmlData.onLoad = function (success)
{
if (success)
{
maxItems = xmlData.firstChild.childNodes.length;
trace (maxItems);
for (i = 0; i < maxItems; i++)
{
smsTexte = mSmsTxt.duplicateMovieClip("smsItem" + i, i, i);
smsTexte.smsTxt.text = xmlData.firstChild.childNodes[i].attributes.testo + " - ";
smsTexte._visible = false;
if (i == maxItems - 1)
{
makeMenu();
} // end if
} // end of for
} // end if
};