1 Reply Latest reply on Jul 31, 2008 10:42 AM by TessandraFae

    loadClip onLoadInit will not resize image

      Hi all,

      I'm trying to tweak an application that helps user create business cards using Flash.
      Usually the backgrounds used for the business card canvas are 72 dpi, but my client wants to use 300 dpi images.

      So, I'm attempting to load a 300 dpi image and scale it down to fit within the canvas. Sounds easy right?

      Look at : http://www.pickleprint.com/tabid/77/default.aspx?ciID=0&ProdCode=BC&tf=54_F&tb=54_B&rx=128 0&uID=&txID=54

      If you click on zoom out, you can see the background is WAY larger than the intended area. The alerts show the dimensions of the image before and after the resize attempt, but the image will not resize on the display.

      Here's the code snippet: (fyi, had to publish at Flash Player 7. publishing at 9 had no effect.)

      myListener.onLoadInit = function (target_mc)

      w = _root.MasterWidth; //the height of the desired template
      h = _root.MasterHeight; //the width of the desired template

      _root.command("alert", target_mc._width); // trace the original width of the 300 dpi background
      _root.command("alert", target_mc._height); // trace the original height of the 300 dpi background

      target_mc._width = w; // resize attempt
      target_mc._height = h; // resize attempt

      _root.command("alert", target_mc._width); // trace dimensions after resize
      _root.command("alert", target_mc._height);


      my_mcl.loadClip(_root.ServerPath + "Images/LowRes_Front/" + _root.FrontTemplateName + "_LR.jpg", _root.FTL);

      The image loads, but will not resize down. I've tried several variations and outside functions to force a resize, and it's ignoring me. _root.FTL is the name of the movieclip target.

      Do you know of any bugs regarding this?