Hello.I'm not sure if Printing in Flash is really a big deal for the Newgrounders,but maybe for big companies with Flash websites...anyways,printing is rather easy.
Ok...First of all,create a button.Have text in the button say "Print" or however anyone says print...
Well,give it the instance of "print".
Now,add these actions to your frame...
_root.print.onRelease = function() {
var pri = new PrintJob();
pri.start();
pri.paperWidth = 800;
pri.paperHeight = 600;
};
If you did all right,a Print screen should pop-up asking for the Print setting and all that.
Well,this tutorial wouldn't do good without explaining,just to make it longer.
_root.print.onRelease = function() {
}
This code is the onRelease function for setting a code to a button,but not in the button actions...or whatever...
var pri = new PrintJob();
'var' will set a new variable.The variable name is 'pri',short for print.'new PrintJob' is stating that there will be a new print.
pri.start();
This code allows the print to start,or open up the window to start.
pri.paperWidth = 800;
pri.paperHeight = 600;
Sets the width and the height of the print.I'm just using 800x600.
Well that's pretty much all...might be to easy,but I doubt anyone on Newgrounds really cared to look into the Print.I'm just trying to make AS:Main bigger :D