crazycoder
08-07-2006, 05:52 PM
I have this code to load some items into a carousel:
xml.onLoad = function() {
var nodes:Array = this.firstChild.childNodes;
numOfItems = nodes.length;
for (var i = 0; i < numOfItems; i++) {
var t = home.attachMovie("item","item" + i, i);
t.angle = i * ((Math.PI * 2) / numOfItems);
t.toolText = nodes[i].attributes.tooltip;
t.href = nodes[i].attributes.href;
t.icon.inner.loadMovie(nodes[i].attributes.image);
t.ref.inner.loadMovie(nodes[i].attributes.image);
t.icon.onRollOver = over;
t.icon.onRollOut = out;
t.icon.onRelease = released;
t.onEnterFrame = mover;
tooltip.swapDepths(home.getNextHighestDepth());
}
}
then I have this:
function released() {
var myURL:String = this._parent.href;
getURL("javascript:openNewWindow('" + String(myURL) + "');");
}
When I click on one it opens up only a blank page.
If you want the whole source, you can get it here http://www.revengeofthekillersnowgoons.com/flash/carousel.fla
xml.onLoad = function() {
var nodes:Array = this.firstChild.childNodes;
numOfItems = nodes.length;
for (var i = 0; i < numOfItems; i++) {
var t = home.attachMovie("item","item" + i, i);
t.angle = i * ((Math.PI * 2) / numOfItems);
t.toolText = nodes[i].attributes.tooltip;
t.href = nodes[i].attributes.href;
t.icon.inner.loadMovie(nodes[i].attributes.image);
t.ref.inner.loadMovie(nodes[i].attributes.image);
t.icon.onRollOver = over;
t.icon.onRollOut = out;
t.icon.onRelease = released;
t.onEnterFrame = mover;
tooltip.swapDepths(home.getNextHighestDepth());
}
}
then I have this:
function released() {
var myURL:String = this._parent.href;
getURL("javascript:openNewWindow('" + String(myURL) + "');");
}
When I click on one it opens up only a blank page.
If you want the whole source, you can get it here http://www.revengeofthekillersnowgoons.com/flash/carousel.fla