Hi Flex Community,
I'm having trouble with this one. I have an xml file that
looks like this (although it could be much longer):
I had been manually embedding the images as follows:
public var honeyFrame:Class;
But know I would like to programatically loop through the xml
file and embed each of the images and then reference them in an
array (or something similar). The end goal is that I have a single
mxImage tag whose source loops through each of the images when a
button is pressed. Any help on this would be greatly appreciated.
I tried out using mx:Loader and that worked well, however
when doing it this way the images can't be scaled with scale-9,
since scale-9 only works with embedded images.
Is there a way to achieve this if the xml is available at
compile time? My goal is to have the a large number (50-100) images
emedded programatically such that I can easily make them visible or
invisible when a button is pressed (a next image button) and the
images must be scalable via scale-9.
The manual way to do this that I can think of would be to
manually embed each one in the code, load the bindable id's of each
image into an array, and then have a function which changes the
source of an mx:Image to the next item in the array. This function
can be called when the button is pushed.... Is there an easier