4 Replies Latest reply on May 21, 2008 1:20 PM by Shandy Elliott

    CS3 Loader component and IE7

    Shandy Elliott Level 1
      I'm not too sure I want to troubleshoot anymore when it comes to the Loader component and IE7, but I wanted to check if anyone has anything new on the matter. All searches concerning this issue show unanswered posts, so I guess it's just another bug/conflict that Adobe isn't concerned about or if the issue is just with IE7. The main issue is when loading images into the loader component, scaleContent set to default (true), autoLoad set to default (true), when images are loaded, they are not always aligned properly in the center. Plus, most of the time I see a flicker of the image appearing either on the top left or bottom left of the loader before the image appears as it should. I've even tried AS2 to center the loader.content._x and loader.content._y on listener.complete (see code), but randomly the loaded image's (0,0) position seems to be in the center of the loader (I was going to provide a screen shot of what I'm talking about, but I think the explanation is clear). All the above works great on Firefox, Opera, Safari, and even the crappy AOL browser, but not consistently on IE7.

      Is this a known issue or an unsolved bug?

      Unless anyone has an answer to the above, I would like to also ask around about purchasing loader components online. I've seen several, but wanted some testimonials from people who have used them.

      If anyone wants to visually see what I'm talking about, go to Design Visions of Austin and click "on the boards". If you compare the website using Firefox versus IE7, you will see what I mean.

      Thanks to anyone who can help. I hope this post doesn't go unanswered. In the past, I've helped a lot of people, so I would appreciate if someone could help me for once :) thanks again...

      I just realized... two variables I mentioned in my code were assigned prior to the attached code.

      var cpLoader:mx.controls.Loader;
      var cpLoaderWidth:Number = cpLoader.width;
      var cpLoaderHeight:Number = cpLoader.height;
        • 1. Re: CS3 Loader component and IE7
          RossRitchey Level 4
          The flicker happens on both FF2 and IE7, and is because you are positioning after the load is complete. To solve this, set the visibility of the Loader to false (cPLoader._visible = false;) before moving the content, and to true after. IE (you could try it this way, but it might not work)

          cpLoaderListener.complete = function(evt_obj:Object) {
          mcPreloaderClip._visible = cpLoader._visible = false;
          var cpLoaderContentWidth:Number = cpLoader.content._width;
          var cpLoaderContentHeight:Number = cpLoader.content._height;
          cpLoader.content._x = (cpLoaderWidth - cpLoaderContentWidth) / 2;
          cpLoader.content._y = (cpLoaderHeight - cpLoaderContentHeight) / 2;
          cpLoader._visible = true;

          It would be better to set cpLoader._visible = false on the button click that loads the image, maybe with an automatic fade out implemented to make it smoother. Then setting it back to true after moving it fixes the flicker effect.

          As for the centering not working in IE7. The very first image does not center properly in IE7, but after that everything works identical to FF. I am unsure how to fix that issue. I have always implemented a centering script myself to ensure that things get centered properly, and have not yet had any problems with it.
          • 2. Re: CS3 Loader component and IE7
            Shandy Elliott Level 1
            Since "cpLoader" is the Loader Object, don't you have to use "cpLoader.visible = false"? Since my post, I have actually tried what you mentioned, and things seem to be working better except for "that initial image that loads" is still aligning at (0,0). I took out my centering script because it seems to throw IE7 for a crazy loop. Right now, on the Properties" page, when you click any of the image thumbnails on the left panel, they make the cpLoader invisible, loads the image, using a complete listener I have made it call a function that waits 500 ms before it makes the cpLoader visible again. I know it's messy code, but that's what I have for now. I will try to reimplement my centering code and try what you suggested.

            BTW... you mentioned "your centering script"... is it much different than mine ?
            • 3. Re: CS3 Loader component and IE7
              RossRitchey Level 4
              When I write a re-centering for the AS2 Loader, I usually set scaleContent to false, so that the loader resizes itself to the size of the content. Then I put the repositioning code in the "resize" event. The code is essentially the same as yours, but I only look at the size of the component itself given that the component will always be the same size as the content.
              • 4. Re: CS3 Loader component and IE7
                Shandy Elliott Level 1
                In my case, I can't set scaleContent to false because of my clients desire to have such irregular image sizes. Some of his images are extremely wide in the landscape orientation. Currently, I have resized all the images to be no more in height than the height of the available space (which is 396 - their width would end up just being some number proportional to the height). I originally created my "available space" proportionally considering my client would send me photos with the aspect ratio of 4:3 or 3:4. Even after resizing the images' height to 396, the proportion of the width (on some images) exceed 820. So, that was a long-winded reason why I need the Loader to scale the content, but I understand how your suggestion would work.

                Thanks again for your time... now... I'm still curious about purchasing loader components online. Since this topic post may have become a little too lengthy for some to answer about that, I may open another topic just with that question.