This content has been marked as final. Show 4 replies
thisPanel.id = itemID;
thisPanel.name = itemID;
I don't know why id is not treated as you would think it should, but name works as you would expect.
Thanks for your reply Greg.
I'm still having the same trouble. It's not the actual thisPanel.id or thisPanel.name causing the trouble.
In the eventListener for the image (I have also created one for a button on the panl to link through to the same page as well), the itemID variable for all is exactly the same, and appears to be the last itemID from the XML item.
The confusing thing is that within the same function, where the image is created, (and where the button is created in the newer version), the itemID is displaying correctly, with the individual id's. It's purely the eventListener function that has the one single id, and therefore not linking through to the correct page for the items.
Can anyone help?
You can try using the logic you were using in your previous sample posted. Use the event.currentTarget.id to get the ID of the Image.
var imgId:String = e.currentTarget.id;
var url:URLRequest = new URLRequest(" http://localhost/youtubeDownloader-debug/index.cfm?video=" + imgID);
You can also use the "data" property of the Image to store the value you want and use the same property to get the value in the event listener.
Hope this helps.
thank you so much, man. That works perfectly.. I'm a very happy bunny now! Thank you! :)