2 Replies Latest reply on Nov 17, 2006 11:20 AM by cewingCME

    load function for duplicating jpg images fails on server

    cewingCME Level 1
      Howdy,

      I have a function in a presentation application that duplicates jpg data that is being loaded into movie clips on the stage as bitmaps, and attaches the resulting bitmap to movie clips held in a 'magnifying glass'.

      Both the main stage and the magGlass are preloaded with movie clips equal to the number of slides that will be shown, and then as each slide (JPG) is loaded into the stage clip stack in the appropriate place, a duplicate bmp is created and attached to the mag glass stack in the same place. The basic code that does the job is attached below.

      The function works great locally, that is to say when I test it on my own machine the mag glass is loaded and content shows immediately when I activate the magnifier. However, the same app loaded to my server fails. The mag glass shows only a plain, white content. No magnified image at all.

      This seems a bit odd, I would figure that I would get either the slide content loaded up or nothing at all. How do I end up with a white background?

      I don't think this is a security issue, I have all the appropriate permissions set to load the jpgs, and they show up fine on the stage.

      Any suggestions?
        • 1. Re: load function for duplicating jpg images fails on server
          digitellinc
          What I think is happening is that you are attaching the bitmap before it is loaded, you will need to do this when the load is complete then attach it to the Magnifier. You don't see this locally because the file loads are instant.

          Something like

          var loadListener:Object = new Object();

          loadListener.onLoadComplete = function(loadTarget) {

          // your code

          }

          loader.addListener(loadListener);
          • 2. Re: load function for duplicating jpg images fails on server
            cewingCME Level 1
            digitellinc,

            That's not it. I tried and using onLoadComplete fails totally, even on the local machine. I then read about the various funcs available to a listener, and onLoadInit happens after onLoadComplete (once the fully loaded movie is initialized).

            Also, I load the same files from the same source on both local and server machines, and in both cases the loaded files are on a different machine over the network, so that timing shouldn't be an issue.

            Any other ideas, anyone???