Action-script for my own preloader

Hi everybody :slight_smile:
i have a problem with my action script for my preloader!!
i know that i can find losts of finished preloders but i want to make my own

i have made a scene called preloader
and 3 layers 2 of them is moviclips

one with the effect = 2 cirkels skewing against eche others.
the other one with the text Loading

now i need to make a actionsript but i really dont know how

as i was saying i got a scene called preloader
and i got a scene called Main

and i only want my preloader to go from 0-100 %
and then goto the Main scene

What do i do and how