00:00
00:00
Newgrounds Background Image Theme

StemlyAnarchy just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

AS:Print 2005-12-11 21:07:43


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


wat

Response to AS:Print 2005-12-11 21:09:50


Good job. I think most people knew this already but to the people that didn't this is helpful.

Response to AS:Print 2005-12-11 21:11:01



wat

Response to AS:Print 2005-12-11 21:17:58


lol cool kinda usless but not realy

Response to AS:Print 2005-12-11 21:23:47


At 12/11/05 09:12 PM, DemonHurter wrote: um yeah

First time poster in one of my threads ;)


wat

Response to AS:Print 2005-12-11 21:33:16


or you could just do

print()

or

printAsBitmap()

Response to AS:Print 2005-12-11 21:53:40


Pretty cool :)

I'll use it for the new website I'm making... These guys from the Tequila company wanted a function like this to print some stuff from their website...

Response to AS:Print 2005-12-11 23:19:16


Glad I can help out a mod :D


wat

Response to AS:Print 2006-01-16 14:42:31


Pretty handy. Nice work -Thomas.

Response to AS:Print 2006-02-18 13:44:44


*yay!* ive been looking for a tutorial on this for AGES!!! thanks so much!!!!!!!!


If a man that always tells the truth comes up to you and says that another man always tells lies, and the man who always lies come up to you and says "I'm lying", then is he?

BBS Signature

Response to AS:Print 2006-02-18 13:50:24


Wow, that was kinda shit.. what about explaining print(), printNum(), printAsBitmap() and printAsBitmapNum()? If you explained all of them, how they're different, they're different parameters, etc - then maybe this coulda been useful.


Sup, bitches :)

BBS Signature

Response to AS:Print 2006-02-18 14:28:30


At 2/18/06 01:50 PM, -liam- wrote: Wow, that was kinda shit.. what about explaining print(), printNum(), printAsBitmap() and printAsBitmapNum()? If you explained all of them, how they're different, they're different parameters, etc - then maybe this coulda been useful.

hey man quit being so tight, we never saw you put effort in like this! >=|

Response to AS:Print 2006-02-18 15:04:47


At 2/18/06 01:50 PM, -liam- wrote: Wow, that was kinda shit.. what about explaining print(), printNum(), printAsBitmap() and printAsBitmapNum()? If you explained all of them, how they're different, they're different parameters, etc - then maybe this coulda been useful.

you stole my sig

Response to AS:Print 2006-02-18 15:25:45


At 2/18/06 02:28 PM, ryanpridgeon wrote: hey man quit being so tight, we never saw you put effort in like this! >=|

Put effort into what? There was obviously no effort put into this tutorial because he didn't even explain all of what I said.

At 2/18/06 03:04 PM, ImpotentBoy2 wrote: you stole my sig

I told you already, I'm only going to have this conversation through my lawyer.


Sup, bitches :)

BBS Signature

Response to AS:Print 2006-02-19 07:02:32


Is there a way to print a specific movie clip.

,Ali.


BBS Signature

Response to AS:Print 2006-02-19 07:06:15


At 12/11/05 09:33 PM, Glaiel_Gamer wrote: or you could just do

print()

or

printAsBitmap()

... Lol yeah. :P

It didn't cover everything about printing, and meh, it was a whole AS thread just about one small thing. It could be better, but it's alright, I guess.


BBS Signature

Response to AS:Print 2006-02-19 08:40:58


Any ideas on how to print movie clips?

,Ali.


BBS Signature

Response to AS:Print 2006-06-16 13:21:13


Geez... im horrible with actionscript. Where do I put the instance name of the button? or... do I even do that?

Response to AS:Print 2006-06-16 13:44:23


Yes, nice, really nice.

Response to AS:Print 2006-06-16 13:46:28


Next time put a link to AS: Main.

Good tut though.

Response to AS:Print 2006-07-20 00:03:31


Sorry to bump this, but I just figured out you could use this to send an endless amount of print commands and screw with other's PCs, I should e-mail Adobe and see if they have a way of stopping it...

Wow, that would suck...

Ignore this post, I'm giving you people ideas....


wew

Response to AS:Print 2006-08-11 20:37:58


At 12/11/05 09:07 PM, -Thomas wrote: _root.print.onRelease = function() {
var pri = new PrintJob();
pri.start();
pri.paperWidth = 800;
pri.paperHeight = 600;
};

If your using flash mx pro 2004 you need to use this script

on(release){ _root.print = function() {
var pri = new PrintJob();
pri.start();
pri.paperWidth = 800;
pri.paperHeight = 600;
};
}

Just thought id contribute to this nicely

Response to AS:Print 2007-10-30 20:26:37


Does it print the whole screen? or just the flash or just the screen with a big white spot where the flash is?


BBS Signature

Response to AS:Print 2007-10-30 20:33:55


Good to know.... but I'm not sure exactly what I would use it for...