Centering Dynamic Stage Elements
Learn how to auto-center any dynamically loaded elements. This code is mostly used for dynamic flash image galleries that can adjust the large pic window for picture size and center images even if they happen to be different sizes. I have also used this code when loading video files into a movieclip dynamically at runtime.