Hi there,
I have an interesting little problem… I have a number of thumbnail buttons that I am loading images into and I want to be able to load that image larger when you click on it, here is the code so far…
for(var i =1; i < imageTotal; i++){
var thumbLoader =new Loader();
thumbLoader.load(new URLRequest("images/portfolio/thumbs/" + i + ".jpg"));
portfolioSectionMC["thumbMC" + i].imageHolderMC.addChild(thumbLoader);
portfolioSectionMC["thumbMC" + i].imageNo = i;
portfolioSectionMC["thumbMC" + i].thumbBU.addEventListener(MouseEvent.MOUSE_DOWN, thumbButton);
function thumbButton(event:MouseEvent):void {
}
}
In as2 I would have simply put _this._parent.imageNo = imageNo to get the number of the button however the new way that as3 asigns buttons means that I cannot use this in a button as it is a function separate from the button. Any ideas how I could go about getting the imageNo variable from within the button without coding every single button separately?
Thanks,
Bob