Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Keeping track of randomly generated sequence of images.

Explorer ,
Oct 04, 2022 Oct 04, 2022

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? 

118
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 04, 2022 Oct 04, 2022
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines