20 Replies Latest reply on Sep 6, 2007 1:59 PM by kglad

    dynamic swf loader issues...

      Hey guys,

      Im working on a flash project that dynamically loads other flash videos into a 'holder' movie clip. This holder should never be larger than 500x330 however, some of the files it loads may be larger than that. At any time, there maybe 1-N files because Im using XML to store the filenames (and display names) so when I click on a button (1,2,3,4 and 5 and "pagination" is used) I clear the previous movieclip (or so I think), load the current file into the holder_mc and then calculate offsets for centering the holder_mc (the holder_mc is actually a child of 'main_mc') I also try and scale the holder_mc down to fit the required dimensions of 500x330....

      This is where it goes wacky. First off all, I have to click the button 3 times (reload the same swf 3 time) before it will scale and position correctly. Im 100% positive that the previous movie is being cleared and if it isn't then theres a problem with flash it self because i have followed the documentation and about 10 articles just to ensure that I was doing it right)

      Anyway, the problem is... sometimes they are PERFECT and other times they are to large, to small, etc. Im going nuts trying to solve this. I was actually having the same issue with another project where once I tried to "restart" the game (ie. resetting everything back to original values) the collision detection was totally messed up... it almost seemed as though the previous data was causing collisions even when the actual movie clip (and I put a box for the bounds for visuals) was tripping a collision WAY TO EARLY).

      Anyway, I really need help with the previous issue. Please help!!