Forum Topic: AS:Print

(2,094 views • 24 replies)

This topic is 1 page long.

<< < > >>
None

Thomas

Reply To Post Reply & Quote

Posted at: 12/11/05 09:07 PM

Thomas LIGHT LEVEL 13

Sign-Up: 02/14/05

Posts: 2,833

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


None

Madferit

Reply To Post Reply & Quote

Posted at: 12/11/05 09:09 PM

Madferit FAB LEVEL 10

Sign-Up: 07/29/05

Posts: 3,333

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


None

Thomas

Reply To Post Reply & Quote

Posted at: 12/11/05 09:11 PM

Thomas LIGHT LEVEL 13

Sign-Up: 02/14/05

Posts: 2,833


None

shazwoogle

Reply To Post Reply & Quote

Posted at: 12/11/05 09:17 PM

shazwoogle NEUTRAL LEVEL 11

Sign-Up: 09/27/04

Posts: 2,681

lol cool kinda usless but not realy


None

Thomas

Reply To Post Reply & Quote

Posted at: 12/11/05 09:23 PM

Thomas LIGHT LEVEL 13

Sign-Up: 02/14/05

Posts: 2,833

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

First time poster in one of my threads ;)


None

Glaiel-Gamer

Reply To Post Reply & Quote

Posted at: 12/11/05 09:33 PM

Glaiel-Gamer NEUTRAL LEVEL 27

Sign-Up: 12/28/04

Posts: 8,045

or you could just do

print()

or

printAsBitmap()


None

Ozcar

Reply To Post Reply & Quote

Posted at: 12/11/05 09:53 PM

Ozcar EVIL LEVEL 32

Sign-Up: 05/12/02

Posts: 33,340

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...


None

Thomas

Reply To Post Reply & Quote

Posted at: 12/11/05 11:19 PM

Thomas LIGHT LEVEL 13

Sign-Up: 02/14/05

Posts: 2,833

Glad I can help out a mod :D


None

Acerbic

Reply To Post Reply & Quote

Posted at: 1/16/06 02:42 PM

Acerbic DARK LEVEL 35

Sign-Up: 11/07/04

Posts: 2,118

Pretty handy. Nice work -Thomas.


Happy

DragonFruit-Rock

Reply To Post Reply & Quote

Posted at: 2/18/06 01:44 PM

DragonFruit-Rock EVIL LEVEL 13

Sign-Up: 12/31/05

Posts: 1,248

*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

None

liaaaam

Reply To Post Reply & Quote

Posted at: 2/18/06 01:50 PM

liaaaam NEUTRAL LEVEL 22

Sign-Up: 12/11/04

Posts: 14,534

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.


None

RyanPridgeon

Reply To Post Reply & Quote

Posted at: 2/18/06 02:28 PM

RyanPridgeon LIGHT LEVEL 11

Sign-Up: 12/07/05

Posts: 1,978

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! >=|

I make flashes because I can.
PM me for anything flash or web related or visit my blog here on NG!
Also, here's my DICK

BBS Signature

None

ImpotentBoy2

Reply To Post Reply & Quote

Posted at: 2/18/06 03:04 PM

ImpotentBoy2 LIGHT LEVEL 18

Sign-Up: 04/01/03

Posts: 5,318

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

Some times my "L" key decides not to work.


None

liaaaam

Reply To Post Reply & Quote

Posted at: 2/18/06 03:25 PM

liaaaam NEUTRAL LEVEL 22

Sign-Up: 12/11/04

Posts: 14,534

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.


Happy

Depredation

Reply To Post Reply & Quote

Posted at: 2/19/06 07:02 AM

Depredation LIGHT LEVEL 17

Sign-Up: 09/05/05

Posts: 4,781

Is there a way to print a specific movie clip.

,Ali.

BBS Signature

None

Toast

Reply To Post Reply & Quote

Posted at: 2/19/06 07:06 AM

Toast DARK LEVEL 09

Sign-Up: 04/02/05

Posts: 8,918

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.


Questioning

Depredation

Reply To Post Reply & Quote

Posted at: 2/19/06 08:40 AM

Depredation LIGHT LEVEL 17

Sign-Up: 09/05/05

Posts: 4,781

Any ideas on how to print movie clips?

,Ali.

BBS Signature

Questioning

crumbnumber1

Reply To Post Reply & Quote

Posted at: 6/16/06 01:21 PM

crumbnumber1 NEUTRAL LEVEL 13

Sign-Up: 02/04/05

Posts: 79

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


Happy

NinoGrounds

Reply To Post Reply & Quote

Posted at: 6/16/06 01:44 PM

NinoGrounds EVIL LEVEL 17

Sign-Up: 11/28/05

Posts: 3,760

Yes, nice, really nice.


None

RyanPridgeon

Reply To Post Reply & Quote

Posted at: 6/16/06 01:46 PM

RyanPridgeon LIGHT LEVEL 11

Sign-Up: 12/07/05

Posts: 1,978

Next time put a link to AS: Main.

Good tut though.

I make flashes because I can.
PM me for anything flash or web related or visit my blog here on NG!
Also, here's my DICK

BBS Signature

None

Not-an-S

Reply To Post Reply & Quote

Posted at: 7/3/06 10:00 PM

Not-an-S EVIL LEVEL 07

Sign-Up: 10/31/05

Posts: 119

The only other thing i was wondering is how to print multiple pages such as one saying:
LOL
and the other saying:
LMAO
without having 2 different buttons or print messages


None

Trunks

Reply To Post Reply & Quote

Posted at: 7/20/06 12:03 AM

Trunks DARK LEVEL 22

Sign-Up: 07/31/05

Posts: 4,167

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....

'05 users for the win :3

BBS Signature

None

azza3809

Reply To Post Reply & Quote

Posted at: 8/11/06 08:37 PM

azza3809 FAB LEVEL 25

Sign-Up: 01/14/06

Posts: 138

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


None

dJtl

Reply To Post Reply & Quote

Posted at: 10/30/07 08:26 PM

dJtl EVIL LEVEL 05

Sign-Up: 10/12/07

Posts: 242

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

None

HorrificMonster

Reply To Post Reply & Quote

Posted at: 10/30/07 08:33 PM

HorrificMonster NEUTRAL LEVEL 11

Sign-Up: 05/11/04

Posts: 225

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


All times are Eastern Standard Time (GMT -5) | Current Time: 06:39 AM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!