3 Replies Latest reply on Feb 19, 2007 11:48 AM by Newsgroup_User

    Printing

    PPineapple
      i have a button and i want it to print a frame when pressed
      this is what i've got:

      on (release) {
      //I need to print a frame labled "c2"
      }

      thanks
        • 1. Re: Printing
          Level 7
          PPineapple,

          > i have a button and i want it to print a frame when
          > pressed this is what i've got:
          >
          > on (release) {
          > //I need to print a frame labled "c2"
          > }

          The on (release) { ... } part is a good start. This allows you to
          respond to a mouse click -- actually, a release of the mouse -- over an
          object that supports such functionality. For the next part, take a look at
          either the print() function or the PrintJob class. Personally, I find the
          PrintJob class to be the better approach: it's the newer feature --
          available since Flash Player 7, while print() has been available since Flash
          Player 4 -- and provides a bit more control. But check them both out in the
          ActionScript 2.0 Language Reference and see which one makes more sense to
          you.

          If you have additional questions, bring 'em on back and we'll keep
          working at it. :)


          David Stiller
          Adobe Community Expert
          Dev blog, http://www.quip.net/blog/
          "Luck is the residue of good design."


          • 2. Re: Printing
            PPineapple Level 1
            thanks
            i dont quiet understand the parameters of printjob,
            • 3. Re: Printing
              Level 7
              PPineapple,

              > thanks
              > i dont quiet understand the parameters of printjob,

              What, specifically? I'm looking at the addPage() method, for example.
              The docs tell me this:

              public addPage(target:Object, [printArea:Object], [options:Object],
              [frameNum:Number])

              The first parameter is a movie clip, and I'll grant that the docs aren't
              specifically clear on this point -- at least, not in the method signature as
              shown. The rest of the parameters are optional, which you can tell because
              they're enclosed in brackets. Brackets don't always mean "optional," but
              they do in this specific area of the documentation.

              So, the second parameter accepts an object, comprised of four properties
              that determine the "surface area" of the movie clip to print. The third
              parameter is also an object, which determines whether or not to print as
              bitmap (versus vectors). You can supply null for either of these and accept
              the default values. The fourth parameter accepts a number, and that's what
              frame to print.


              David Stiller
              Adobe Community Expert
              Dev blog, http://www.quip.net/blog/
              "Luck is the residue of good design."