I’ve searched for ages on this and I can’t see how it’s done, so please help!
I’ve got a set of images in my library and each one has been “exported for actionscript” with class names of stim1, stim2…stim12.
Now, I have a bit of actionscript code that creates instances of these classes and will load the stimuli to the stage:
var BitmapDataLeft:stim1 = new stim1(150,150);
var imageLeft:Bitmap = new Bitmap(BitmapDataLeft);
addChild(imageLeft);
What I would really like to do, however, is load an image based on the current status of a variable. So for example I’ve got an array that has all the image names in it, and a counter called “trialCount”. When this is at 6, I’d like to present item 6 (i.e. cueNames[trialCount]).
How do I merge that with my image loading code?
Or, if it makes more sense, is there a way to create an array of images???
many thanks - as you can see this is all new to me.