1 Reply Latest reply on May 29, 2007 12:10 PM by Newsgroup_User

    Upload and include own image

    Mike Crisp Level 1
      HI

      I have an interactive feature which allows the user to type and save / reopen using fileio.

      I would to be able to allow the user to 'Upload' their own logo / badge into a cast and have the stage and subsequent printomatic script place their logo on the screen and on the printout.

      I would need to restrain the max size of the image to a certain size.

      Any ideas

      Thanks
        • 1. Re: Upload and include own image
          Level 7
          Mike,

          You can either figure out how to create a graphic castmember on the fly, or
          make a dummy castmember and link it to an external jpg with nothing in it
          (some dummy graphic, I use a 1 pixel dot). Then using a file open dialog,
          which I believe you can do with fileio. Then after the user selects the
          graphic, you set the filename of the dummy member to the graphic file the
          user has selected. You can use imaging lingo to resize the graphic. Then you
          have a castmember that you can manipulate as you mention. If you need to
          save the logo into the cast for later use, you might want to look up
          importfileinto, and savecastlib.

          Here's a line from some of my code where I change the size of a graphic to
          get you started:

          imSmall.copyPixels(imSource, imSmall.rect, imSource.rect)

          Timm



          "Mike Crisp" <webforumsuser@macromedia.com> wrote in message
          news:f3heot$r21$1@forums.macromedia.com...
          > HI
          >
          > I have an interactive feature which allows the user to type and save /
          > reopen
          > using fileio.
          >
          > I would to be able to allow the user to 'Upload' their own logo / badge
          > into a
          > cast and have the stage and subsequent printomatic script place their logo
          > on
          > the screen and on the printout.
          >
          > I would need to restrain the max size of the image to a certain size.
          >
          > Any ideas
          >
          > Thanks
          >