Using loader component for external swf and jpg. HELP

Here is the situation:

I want to use loader for loading external swf and jpg. I found a tutorial how to do that with a preloader component and loader component. however I want to have my own preloader and thus I cant use the script provided in the tutorial. could some please write the script for a preloader (just a bar moving from left to right, no numbers, no nothing) that loads an image in a loader component. by the way please also write the script for the loader as well and where all of those scripts should be writen.

10000000000 thanks!!!