
Welcome Guest
|
#1
|
|||
|
|||
|
multiple random images
Hi I have to put ten random images on a page I am loading these via XML however the problem I have is that some of the images are coming up as duplicates any ideas on how to stop reapeating an image on the page.
The code is as follows; Actionscript:
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
thm1.loadMovie(thumb1[Math.floor(Math.random()*total)], 1);
thm2.loadMovie(thumb2[Math.floor(Math.random()*total)], 1);
thm3.loadMovie(thumb3[Math.floor(Math.random()*total)], 1);
thm4.loadMovie(thumb4[Math.floor(Math.random()*total)], 1);
thm5.loadMovie(thumb5[Math.floor(Math.random()*total)], 1);
thm6.loadMovie(thumb6[Math.floor(Math.random()*total)], 1);
thm7.loadMovie(thumb7[Math.floor(Math.random()*total)], 1);
thm8.loadMovie(thumb8[Math.floor(Math.random()*total)], 1);
thm9.loadMovie(thumb9[Math.floor(Math.random()*total)], 1);
thm10.loadMovie(thumb10[Math.floor(Math.random()*total)], 1);
}
}Regards Barry Last edited by saumya : 03-22-2006 at 06:23 AM Reason: missing "as" tags |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| randomizing banner with multiple images | kriffer | Newbies |
1 | 03-06-2008 04:15 AM |
| Preloader for multiple images | Bromid | Flash CS3 / Flash 9 |
0 | 02-26-2008 04:14 PM |
| Loading random images in multipe MCs | epix | Flash 8 |
4 | 12-22-2006 02:53 PM |
| How can I get the browser to select header images at random? | spindrift | Client Side | 0 | 01-13-2005 02:52 PM |
| moving multiple images in multiple keyframes | SICON | Newbies |
2 | 09-24-2003 09:21 AM |

Programming Languages



