carmenMiranda
Programmer
If you have read any of my recent posts you'll have worked out that I'm a bit of actionscript newbie who is experimenting with dynamically attached and positioned movie clips.
My latest stumbling block (and thus question) concerns the following: I have a section of code that takes one MC and places numerous instances of that MC to the stage. Rolling over those clips activates a function which references each individual clip by name (thanks Kenneth!). That works perfectly for one MC.
But what if I have a number (let's say 5, for this example) of different MC in the library and want to place instances of these at random?
I first thought of putting the 5 MC into an array, then randomly choosing a position in the array, and then passing the selected MC name to the 'nowGoAndPlaceThisMC' function.
However, I can't seem to make that work.
So my question is : is what i am trying to do conceptually correct (if so, my code construction must be *completely* wrong) or is there a different (simpler?) approach to achieve the same goal?
As always, thanks in advance for any advice with this.
My latest stumbling block (and thus question) concerns the following: I have a section of code that takes one MC and places numerous instances of that MC to the stage. Rolling over those clips activates a function which references each individual clip by name (thanks Kenneth!). That works perfectly for one MC.
But what if I have a number (let's say 5, for this example) of different MC in the library and want to place instances of these at random?
I first thought of putting the 5 MC into an array, then randomly choosing a position in the array, and then passing the selected MC name to the 'nowGoAndPlaceThisMC' function.
However, I can't seem to make that work.
So my question is : is what i am trying to do conceptually correct (if so, my code construction must be *completely* wrong) or is there a different (simpler?) approach to achieve the same goal?
As always, thanks in advance for any advice with this.