Loading a Series of images

Hey
I need help with a small script to load a series of images (img01,img02 and so on) and to put them all in a MC with each and every img in its own frame.
That shouldnt be to hard but i cant figure out how to make it.
All tutorials is fitted for 1 image only…

In my head it looks like this (without correct syntax)


for(i=0;i<totalImages;i++){
mc.loadImage("img"+i+".jpg")
mc.Addframe
}

But of course it aint that easy! Anyone knows how to do this very simple script?