Copy link to clipboard
Copied

this is my game layout,
this is basicaly match order of names.
but every time when game reload all the display names are randomly placed.
i think frame random could be work but don't want to repeat the frame
anyone can help me !!!!
assign your names to an array, then randomizes the array:
var namesA:Array=["xxx","yyy",etc];
namesA=shuffle(namesA);
// namesA is now randomized. you can loop through namesA and present the display names randomly.
// nothing needs to be changed below.
function shuffle(a:Array):Array {
var len:Number = a.length-1;
for (var ivar:Number = len; ivar>=0; ivar--) {
var p:Number = Math.floor(Math.random()*(ivar+1));
var t = a[ivar];
a[ivar] = a
;
a
= t;
}
return a;
}
Copy link to clipboard
Copied
Finally solved!!!
just push one frame ahead in names movieclip and it's perfectly working.
ThAnks
Copy link to clipboard
Copied
you're welcome.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more