|
randomJavascript Sprite AnimationPosted is a working little animation using sprites, iterator and javascript. I want the animation to add the sprites (random size and color) without overlapping, and scroll as the screen fills.
Any help is appreciated.
Sorting a structure randomlyHi Guys! this is my first post. So forgive me if the question could seem stupid I have a directory scanner that retrieve me the list of movies in a specific folder. I'd like to "randomize the order" of that list, so every time i trig the structure, i can scramble the order. I've tried with javascript with something like this
PHP Code:
function (__structure out) main (__structure input){
if(input !=null){
var result=new Object();
result.out=input.sort(function(){return (Math.round(Math.random())-0.5));
return result;
}
} Any solution??? Thanks
Random number sequenceHoi, I made sort of a slideshow with a folder of picts. Now there playing in order. But i want them to play random from lets say 1 to 10 but showing every pict only once. than starting over and show all 10 in a different random sequence. I can't seem to ficker it out. Can somebody help me? It can't be that hard? Thx Tijn
Random-like valuesHi, its a bit hard to tell what i really need, but i give a chance for it :) I have a structure, with some elements. I need to random access elements every 1 seconds, in a 4 sec loop. And, every random element need to be different inside the 4 sec loop. The structure is dynamic, so the multiplexer thing will not working. For example, the structure has 10 members. 1st sec: 6 index 2nd sec: 2 index 3rd sec: 0 index 4th sec: 8 index Loop ended, there is a new structure with 4 element. 1st sec: 3 index 2nd sec: 2 index 3rd sec: 0 index 4th sec: 1 index . . . I couldn't figure out is this possible with JS or with some 'spaghetti', or making a plugin for this is easier?
|