Sound programming
Loading external images
It's not about sound...but technique is very similar.Images like the sounds also may be loaded without importing as raw jpeg files.
Here we combine the tips from the Radio project and knowledge from lesson 10. We will create "Image gallery"
- Open a new file and add the following code into the frame
function gallery() { a = Math.round(Math.random() * 4 ) ; loadMovieNum("http://flashcare.com/art/pic" + a + ".jpg",10); } player = setInterval(gallery,5000);Again as in the previous project we generate a random number… we have only 4 images, so sometimes they are repeated. JPEG file is loaded into the separate level. As you know when it’s done again new content "push out" the old picture.Also we again implement timing with setInterval function…. We added start button with the purpose to start loading files only when you need them.