2 Replies Latest reply on Apr 8, 2008 4:34 AM by TimDixon

    Loading external swf's

    TimDixon
      Hi all,
      I have a flash file which loads in external movieClips/SWF's.

      They seem to be loading ok, but I have a problem if the external swf has content which is outside of its main backround size. With these, it displays everything outside of the screen area too.

      For example... If I have a flash file with an object off the page, to the left; then it animated in to the centre - when you open this normally, you would just see the object appear from the left. When I load it into my app though, I see the object way over to the left to start with!!
      Also, If my flash file is say 640x480 normally, it would now be something like 750x480 since the off-screen object is now added.

      Is there a way of inserting an external flash file and having only the main page area displayed?

      I have an example of the 'problem' here http://www.fullsizemedia.co.uk/lv2/


      I've tried a mask, but its not working properly - mainly because I can't identify the actual size of the swf!

      Any help appreciated.

      Tim.
        • 1. Re: Loading external swf's
          Chrononaut Level 1
          You might try to specify the stage size in your loaded clips as variables (like myHeight=300, myWidth=600), so when it loads you can set the mask size to the correct dimensions and blot out your excess content. Either that or create a mask in your source files that all the content runs within so when it pulls in, everything looks normal.
          • 2. Re: Loading external swf's
            TimDixon Level 1
            Hi Chrononaut, Thanks for the replay.
            I'd tried a mask but it wasn't working quite right.... i was using 'myImportedFlash._width' to get the width (which was giving an incorrect value due to the images overhanging the stage).
            Seeing your phrase 'STAGE size' kinda struck a cord - didn't realise I could use 'Stage.width' to get the actual size.
            ...seems pretty obvious now!
            Anyway, setting the mask size to this works! So thanks! :)

            (...I just need to sort out a calculation to resize the movieClip correctly now; since im going to have to use a multiplier.... minor detail!)

            Cheers,


            Tim