Creating Flash Components

Can someone point towards a tutorial on how to creat flash components? I’m just not sure what the process is to link .as files to GUI definitions and then have that reflected within Flash, ie: being able to drag a copy of my component onto the stage and alter the default component values.