Need help with image loading script

I am new to actionscript and have this template code to load jpgs into flash. My sub menu needs 11 pics. To see the different pics you rollover a square that shows a small preview pic (s1.jpg, s2.jpg,etc.). When you click the square the larger image loads (1.jpg, 2.jpg, etc.). I can get the small menu pics to load 1-11 (s1.jpg, etc). But once I get past pic 6 on the small menu the large images just show 1-6 over again instead of showing large image 7-11. So my small menu can load the small menu pic #8 (s8.jpg) correctly, but when you click it the larger image just reloads #2 (2.jpg) instead of #8 (8.jpg). How do I get all my 11 large images to load instead of just 1-6? Is there something in the code below that I should fix? Thanks!

My code looks like this:

_root.numpics=11;
for (i=2;i<_root.numpics;i++) {
duplicateMovieClip(“s1”,“s”+i,i);
setProperty(“s”+i,_y,getProperty(“s”+(i-1),_y)-16.2);
}
for (i=1;i<_root.numpics;i++) {
a=i;while (a>11) {a-=11};
this[“s”+i].pic.pic.loadMovie(‘gallery/’+_root.gallery+’/s’+a+’.jpg’);
this[“s”+i].viewed=false;
this[“s”+i].select=false;
}
this[“s”+1].viewed=true;
_root.selectgallery=1;
_root.pic=‘gallery/’+_root.gallery+’/1.jpg’;
_parent.bpic.gotoAndPlay(2);
stop();
[URL=“http://www.stos-id.com/gallery”]

I changed the pics under the people menu to be numbered so you can see the issue after pic 6. the small menu pics load correctly but not the large ones reset after 6. it’s weird

Hi,

Yes you can change the number of images by just changing the value inside the movie clips . …

you will find this code there on a button . . .
//
on (rollOver) {
gotoAndPlay(2);
}
on (rollOut) {
gotoAndPlay(12);
}
on (release) {
a = this._name.substr(1, 2);
_root.selectgallery = a;
this.viewed = true;
[COLOR=“Red”]while (a>11) {
a -= 11;
}[/COLOR]
_root.pic = ‘gallery/’+_root.gallery+’/’+a+’.jpg’;
_parent._parent.bpic.gotoAndPlay(2);
}
//
Chnage the value 6 to eleven there . .

you can find the script as . .
on _root,
layer number 7 frame number 34,
go inside the pages movieclip,
on frame one of layer 1, go inside symbol 3,
on layer 7 frame number 20 go inside symbol 25,
on layer 1 movieclip s1,
on layer 1 button, select the button and then press f9 or open action pannel . …
then change the code …

thats it, try it and let me know if its works fine or not . …

cheers

You are awesome! Thank you sooo much! I don’t know much about actionscript so I wasn’t sure what the problem could be since I couldn’t find any 6’s in the code I posted. I knew there had to be a coded 6 in there somewhere. That code wasn’t showing up anywhere in the actions list of the panel. I guess that because it was on a hidden layer?

I am forever in your debt! Thanks! Cheers!