Your code looks ok to me.
You would then listen for MouseEvent.MOUSE_OVER on the container and the event.target should be the image.
This should not cause a performance issue unless you have l hundreds of images. It might help if you size the images up front so you don’t have to scale them. You should not set mouseEnabled and/or mouseChildren on the container, but you might need to set cardImage.mouseChildren
Hey, thanks for your advice. I will look into the Mouse events.
Should I still keep the MouseEnabled property as proposed above? I'm not sure if that will work in the For loop. Does setting that property make it true for each image loaded, or only the last image loaded?
I'm trying to use the minimum amount of MXML I can get away with as I am old school and I have come to believe ActionScript is more FLEXible (hah). So when I mentioned loading image components (ie. Spark controls), that is what slows down the performance. Loading UIComponents is much faster. On the other hand, I could see how it might have been easier to use mouse events on Spark controls.
CardImage is a loop variable so it is setting it on all of them.
For a 100 cards, I’m surprised that Spark Image is that much slower. You could also try using BitmapImage.
Frameworks do have a cost as they are more general so yes, you can always optimize by going low level. But that usually takes more time and maintenance. It is just a trade-off.