Page is a not externally linkable
- Code, Content, and Presentation
-- Flash and Shockwave
---- Problem loading images into Flash carousel via XML


rocknbil - 4:05 pm on Apr 11, 2008 (gmt 0)


What do you get when you do this?

xml.onLoad = function()
{
var nodes = this.firstChild.childNodes; //i.e the XML file hierarchy
numOfItems = nodes.length;
for (var i=0;i<numOfItems;i++)
{
var t = home.attachMovie("item","item"+i,i+1);
trace(' item ' + i + ' ' + "item"+i);
t.angle = i * ((Math.PI*2)/numOfItems);
t.onEnterFrame = mover;
t.icon.inner.loadMovie (nodes[i].attributes.image);
trace(nodes[i].attributes.image);
}
}

This should give you the names of the items, followed by file name of the images that are supposed to load.


Thread source:: http://www.webmasterworld.com/flash/3621143.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com