2 Replies Latest reply on May 17, 2007 1:26 PM by mbodel

    Holding Control of external .swf until fully loaded?

    mbodel Level 1
      Hi, would love help with how to control an external .swf that is not fully loaded (or rather how to stop someone from clicking buttons that effect it oddly). I'm in Flash MX.

      My main movie loads an external .swf into a target using: _root.pictar.loadMovie("whatever.swf");

      The external .swf is a series of 10 photos, each on a frame.

      In my main movie, I then have corresponding thumbnails, which when you click, tell the externally loaded .swf to go to the frame with the full size image on it. Like this:
      on thumbnail #2 the action is

      on (release) {

      All works great, except if I click before the external movie is fully loaded I think. If I click a thumbnail too fast, image 2 comes up when I click thumbnail 8. And everything acts screwy.

      How can I get around this? Can I disable the thumbnail buttons until my external .swf is fully loaded? If that's the only solution what do I do because I'm using the same target "pictar" each time I'm loading a new external .swf?

      The site with this problem is www.gregorygale.com. Maybe that will help. Thanks so much.

        • 1. Re: Holding Control of external .swf until fully loaded?
          Armen Abrahamyan Level 1
          first of all its not good way.
          you could load images inside your holder movieclip once the thumb is clicked.
          if I want to see only last image, why i should wait until all images loaded ? Thats something that you should think about. What if you have 20, 30,.. 50 images ?
          But once you choose that way:
          when thumb is clicked , you can check if that frame is loaded or not.
          if loaded -> show image
          else-> show loading until frame is loaded than target to that frame
          • 2. Re: Holding Control of external .swf until fully loaded?
            mbodel Level 1
            Well, I have 200 images, and want to avoid the user waiting each time for a photo to load, so instead, they wait for each production gallery (10 photos w/ a preloader) and then click instantly. But I still can't figure out how to use a variable to tell the thumbnails not to work until the .swf is fully loaded in the target. I just tried sing a preloader to define a variable:

            onClipEvent (enterFrame){

            myMovBytesTotal =_root.pictar.getBytesTotal();

            and then my thumbnail button has the code:
            on (release) {
            if(_global.myMovLoading == 100){

            which is returning 100 like it should, but crazy stuff still happens when I click the thumbnails too fast. Any ideas?