Skip to main content
Known Participant
May 11, 2006
質問

Syntax of printjob.orientation()

  • May 11, 2006
  • 返信数 4.
  • 520 ビュー
Actionscript 2.0

Still trying to get a handle on 2.0's syntax structure. Here's what I've done:

on (release) {
if ($version != "") {
_root.PrintOut.orientation("landscape");
print ("_root.PrintOut", "bframe");

}
}

mike
このトピックへの返信は締め切られました。

返信数 4

Inspiring
May 11, 2006
You can also scale the clip as well to fit the page and then switch it back afterward.
Inspiring
May 11, 2006
> Thanks for the link. I read it and it still states that
> "PrintJob.orientation()" is read-only. It will be set to
> whatever the user has selected from the print dialogue
> box that appears.

Exactly. The PrintJob class does *not* provide an out-of-the-box way to
override the user's orientation settings.

> So, from my understanding, you would have to have
> your printable items laidout both as landscape and
> portrait so that you could print them as the user wants.

Or ... you can rotate your printable items just before invoking
PrintJob.addPage() -- then rotate them back.


David
stiller (at) quip (dot) net
Dev essays: http://www.quip.net/blog/
"Luck is the residue of good design."


Participating Frequently
May 11, 2006
David,

Thanks for the post. You know I never thought of doing that through code, though I had always just done that manually. Weird how you do things without thinking about them.

Tim
Participating Frequently
May 11, 2006
Mike,

Thanks for the link. I read it and it still states that "PrintJob.orientation()" is read-only. It will be set to whatever the user has selected from the print dialogue box that appears. This dialogue box is not generated in Flash but is your system's default print dialogue box. You may then use this information to setup your printing area as appropriate to the user's preference.

So, from my understanding, you would have to have your printable items laidout both as landscape and portrait so that you could print them as the user wants. But you cannot set the orientation property from within Flash, you can only read it in from the options that the user has selected.

Tim
Participating Frequently
May 11, 2006
Not sure what your question is. Are you using the PrintJob() class? If you are then the "orientation" property is read-only. You can't set it within Flash.

Tim
MikeMedia2作成者
Known Participant
May 11, 2006
Tim:

I need to print a document that is generated by my Flash app in a default "landscape" format.

From what I have read this can be done. I simply cannot figure out how to arrange the syntax properly.
The following is what I have read.

Flash CAN override computer settings.
You can use-
PrintJob.orientation()
and pick-
"Portrait" or "landscape."
Go here and you can see full docs.
http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Flash_MX_2004&file=00001642.html