Tek81
08-27-2008, 03:49 PM
Hi there,
First time poster here.
On to my issue, I have some AS2.0 code pulling in values from XML into my swf and my function that I'm setting for my onRelease is being ran with no interaction at all. Its running in the loop and gives all the correct values, but it just runs on its own without clicking on the images/buttons for the onRelease to take effect. Here is my code for this:
var xmlData:XML = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = function ()
{
var nodes = this.firstChild.childNodes;
header.text = nodes[0].attributes.caption;
numOfItems = nodes.length;
for (var i=0;i<numOfItems;i++)
{
var t = home.attachMovie("item","item"+i,i+1);
var url = nodes[0].attributes.urlLoc + nodes[i].attributes.itemid;
t.angle = i * ((Math.PI*2)/numOfItems);
t.icon.inner.loadMovie(nodes[i].attributes.img);
t.onEnterFrame = mover;
t.icon.onRelease = released(url);
}
}
xmlData.load("flashFiles/items.xml");
function released(e)
{
trace(e);
//getURL(e);
}
and the trace results from the code above:
http://www.myurllink.com/tmg_viewitem.asp?itemnbr=412
http://www.myurllink.com/tmg_viewitem.asp?itemnbr=422
http://www.myurllink.com/tmg_viewitem.asp?itemnbr=487
http://www.myurllink.com/tmg_viewitem.asp?itemnbr=499
http://www.myurllink.com/tmg_viewitem.asp?itemnbr=501
http://www.myurllink.com/tmg_viewitem.asp?itemnbr=502
http://www.myurllink.com/tmg_viewitem.asp?itemnbr=506
http://www.myurllink.com/tmg_viewitem.asp?itemnbr=552
http://www.myurllink.com/tmg_viewitem.asp?itemnbr=660
http://www.myurllink.com/tmg_viewitem.asp?itemnbr=665
The idea is that when clicked it will change the URL you're currently viewing in your browser. But I'm completely lost as to why the onRelease is running with no mouse interaction at all. Any help or ideas would be greatly appreciated.
Thnx
First time poster here.
On to my issue, I have some AS2.0 code pulling in values from XML into my swf and my function that I'm setting for my onRelease is being ran with no interaction at all. Its running in the loop and gives all the correct values, but it just runs on its own without clicking on the images/buttons for the onRelease to take effect. Here is my code for this:
var xmlData:XML = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = function ()
{
var nodes = this.firstChild.childNodes;
header.text = nodes[0].attributes.caption;
numOfItems = nodes.length;
for (var i=0;i<numOfItems;i++)
{
var t = home.attachMovie("item","item"+i,i+1);
var url = nodes[0].attributes.urlLoc + nodes[i].attributes.itemid;
t.angle = i * ((Math.PI*2)/numOfItems);
t.icon.inner.loadMovie(nodes[i].attributes.img);
t.onEnterFrame = mover;
t.icon.onRelease = released(url);
}
}
xmlData.load("flashFiles/items.xml");
function released(e)
{
trace(e);
//getURL(e);
}
and the trace results from the code above:
http://www.myurllink.com/tmg_viewitem.asp?itemnbr=412
http://www.myurllink.com/tmg_viewitem.asp?itemnbr=422
http://www.myurllink.com/tmg_viewitem.asp?itemnbr=487
http://www.myurllink.com/tmg_viewitem.asp?itemnbr=499
http://www.myurllink.com/tmg_viewitem.asp?itemnbr=501
http://www.myurllink.com/tmg_viewitem.asp?itemnbr=502
http://www.myurllink.com/tmg_viewitem.asp?itemnbr=506
http://www.myurllink.com/tmg_viewitem.asp?itemnbr=552
http://www.myurllink.com/tmg_viewitem.asp?itemnbr=660
http://www.myurllink.com/tmg_viewitem.asp?itemnbr=665
The idea is that when clicked it will change the URL you're currently viewing in your browser. But I'm completely lost as to why the onRelease is running with no mouse interaction at all. Any help or ideas would be greatly appreciated.
Thnx