When you specify Flash vars in the embed or object tag they become available to actionscript through _root property of the flash file when it loads.
Example html with flash vars :
Simple slideshow fade in / fade out script in Actionscript2. For a quick flash banner.
The callback is in the onMotionFinished handler function. MC is the movieclip the tween will be applied to.