1 Reply Latest reply on Dec 21, 2009 8:08 AM by kglad

    Button & print AS




      I've created a button and want the action to print the page I put the .swf on. 


      I put in the action 'window.print();' on it's own layer called 'Actions'.  I am getting the following Compiler Error: "Statement must appear within on handler".


      Within the parantheses of the action, it calls for a target/type and I'm not sure what I'm supposed to input here.


      Any help is appreciated!  Attached is the .fla file.




        • 1. Re: Button & print AS
          kglad Adobe Community Professional & MVP

          that error message means your code should be attached to a frame, not an object.


          if you want a button to trigger that code use something like:






          but i'm not sure window.print() will work unless you have an object named window that has a print() method.

          1 person found this helpful