Monster Racer Rush
Select between 5 monster racers, upgrade your monster skill and win the competition!
4.18 / 5.00 3,534 ViewsBuild and Base
Build most powerful forces, unleash hordes of monster and control your soldiers!
3.80 / 5.00 4,200 ViewsI don't actually know if this is possible. But can you make an object equal a movie clip?
Here's what I mean. I have 12 different movieclips drawn out. I have a random number variable and whatever number it generates, I want it to addChild the respective movieclip. The movieclips are all supposed to be called to the same x and y positions, so I was wondering, could I make some object/variable/thing initially equal the movieclip, then addChild that object/variable/thing? Maybe you can't do that, but I'm trying to make my code as clean as possible. xD
Intellectually Questionable? You decide.
At 3/27/12 08:24 PM, Lynkusu wrote: I don't actually know if this is possible. But can you make an object equal a movie clip?
Here's what I mean. I have 12 different movieclips drawn out. I have a random number variable and whatever number it generates, I want it to addChild the respective movieclip. The movieclips are all supposed to be called to the same x and y positions, so I was wondering, could I make some object/variable/thing initially equal the movieclip, then addChild that object/variable/thing? Maybe you can't do that, but I'm trying to make my code as clean as possible. xD
You'd store the movieclips in an array and then reference the movieclip through the random number.
addChild(myArray[number]); Well damn. Can't believe that never occurred to me ._. Thanks. xD
Intellectually Questionable? You decide.