Hi there,
I’ve been experimenting with building an image gallery that gets data from an XML file and loads an image when the playhead reaches a particular frame in the timeline. I did this for animation purposes.
When any button is clicked (onRelease), the variable ‘imageNumber’ is set to a corresponding number, for example, for ‘btn1’, ‘imageNumber = 1;’ e.t.c.
This variable is used to correspond with the XML in order to load the correct image.
All works great, except for one thing that I’m having trouble figuring out…
If a button is clicked, and then the ‘closeBtn’ is clicked, the next time any button is clicked the image that is loaded is the image that was previously closed, even though the ‘imageNumber’ variable seems to be tracing correctly!
The only logic I can put to this is that maybe the ‘imageNumber’ variable isn’t being updated before the image is loaded?
Any ideas guys?
I hope that’s clear, but fla and images are attached also.
Thanks in advance