trinidad2k1
February 2nd, 2002, 12:45 PM
Hi, I am wondering if any of you might have some advice toward solving a script problem I am having. I am trying to write a game. It should give the viewer 12 non duplicationg randomly choosen clips out of 24. this code is called from an empty clip on stage. So far all it gets me is the same card 12 times over and over.
Thank you
Tk1
onClipEvent(load)
{
possibleCards=["card0","card1","card2","card3","card4","card5","card6","card7","card8","card9","card10","card11","card12","card13","card14","card15","card16","card17","card18","card19","card20","card21","card22","card23","card24"];
        randomNum=random(possibleCards);
        {
        for(i=0;i<12;i++)
                {
                this.attachMovie(possibleCards[randomNum],"layOut"+i,i);
                this["layout"+i]._x=i*200;
                this._xscale=25;
                this._yscale=25;
                }
        }
}
Thank you
Tk1
onClipEvent(load)
{
possibleCards=["card0","card1","card2","card3","card4","card5","card6","card7","card8","card9","card10","card11","card12","card13","card14","card15","card16","card17","card18","card19","card20","card21","card22","card23","card24"];
        randomNum=random(possibleCards);
        {
        for(i=0;i<12;i++)
                {
                this.attachMovie(possibleCards[randomNum],"layOut"+i,i);
                this["layout"+i]._x=i*200;
                this._xscale=25;
                this._yscale=25;
                }
        }
}