Skip to main content
Known Participant
October 4, 2022
Question

Keeping track of randomly generated sequence of images.

  • October 4, 2022
  • 1 reply
  • 115 views

Anyone know how I would start to look for how to send/keep the order of a randomly generated sequence of images? I have a MC that is randomly selecting frames based on a defined array, and I need a way to recall that series when the game ends... storing in a SharedObject still a thing? 

    This topic has been closed for replies.

    1 reply

    kglad
    Community Expert
    Community Expert
    October 4, 2022

    no, but you can use an object or an array to store the sequence (or even a string), but an array would probably suffice, depending on what you want to save.

     

    eg, if you an array of frames [0,...., 100] that you randomly select from (and direct whatever movieclip to the selected frame), and you want to store what was selected, you can store the index of the array or the value of the array (or both).  (in my example, the index and frame number are the same).

     

    p.s. javascript arrays (similar to as3 arrays) have a push method that make it convenient to append items to the array.