mardi 7 février 2017

Flash AS3 - how to randomize each frame while play

I have some quiz level 1 in frame 2-11 and frame 12 is the result of quiz, and quiz level 2 in frame 13-22 with result in frame 23..

i want to randomize a quiz between 2-11 and randomize a quiz in frame 13-22,

Example :

  1. 1st quiz is frame 3
  2. 2nd quiz is frame 6
  3. 3rd quiz is frame 2
  4. (... ...)
  5. (n)th ... ... ...(last frame that not yet showing)

I'm using this code in frame 1 :

soal = 1;
var pic:Number=11;
var randomFrame:Number = Math.ceil(Math.random()*pic);

but the flash randomize just first time

i want to know if there is a way to make it possible to make the flash running well like what i want in Example???

Aucun commentaire:

Enregistrer un commentaire