Copy link to clipboard
Copied
I see lots of old examples of randomly loading images or URLs using ActionScript, but nothing recent for HTML5 Canvas. Can anybody help direct me how I could load random images (or movie clips), along with associated links, into a movie clip? I want to create a simple web banner that loads different product images with links to their respective product pages. Many thanks for any insight.
i can't think of anything easier than putting each product on a frame. then display a frame selected randomly.
Copy link to clipboard
Copied
i can't think of anything easier than putting each product on a frame. then display a frame selected randomly.
Copy link to clipboard
Copied
Thank you kglad for the great suggestion. I followed up with another thread to find the exact code needed (thanks Colincolinqawu6 re: Random Frame):
this.gotoAndPlay(15+Math.random()*10);
In this example it would jump to a random frame in the range of 15 to 24. Change the start frame number and the number of different frames, to match your case.
Copy link to clipboard
Copied
you're welcome.