-
random slideshow troubles
I am using MX 2004 and having trouble with a banner. I want to randomly load .jpg's from a file - pausing for 5 sec on each pic. I can get one .jpg to load, but it stops after one. Here's is the codes:
var numArray = ["randomPics/01.jpg",
"randomPics/02.jpg",
"randomPics/03.jpg",
"randomPics/04.jpg",
"randomPics/05.jpg",
"randomPics/06.jpg",
"randomPics/07.jpg",
"randomPics/08.jpg",
"randomPics/09.jpg",
"randomPics/10.jpg"];
this.createEmptyMovieClip("clip_mc", 2);
function changePic(){
numPic = random(numArray.length);
_root.loadMovie(numArray[numPic], "clip_mc");
}
this.onEnterFrame = function(){
setInterval(changePic, 5000);
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|