Topic: Printing from to control scale?

Hey y'all, i'm working on an interactive map project where i'm trying to have the map area printable at whatever zoom level the user is at. the clip is masked, so i'm using the printAsBitmap command in flash to print that specific movieclip.

the problem is that when printing, even though the printAsBitmap command sees the mask and doesn't print anything outside it, it uses the entire size of the movieclip to determine the scale of the printed page. i.e. if you're zoomed into a map and print it, the visible map area prints scaled down to allow for the entire movieclip area (including that outside the mask) to fit on the page even though the unmasked area isn't printed.

I found a reference to this on the flashcoders list that did have a solution:

It seem's clear that when determing the clip size for scaling to print, Flash uses the full size of a masked clip, not the size of the mask itself (which means that the visible area gets badly reduced in the printout).

So, I have one frame labelled #b that contains a object exactly the size of the mask - this becomes the bounding box. Since the masked clip is bigger than this, i reduce the size of it in that frame only so that it's smaller than the masked area - so it doesn't influence the bounding box. Then, in subsequent frames, i return the clip to its rightful size so that it prints correctly.

I'm not entirely sure how this would be implemented. my movie is also all contained on the first frame so i don't have any subsequent frames that i'm printing. thoughts? thanks.

Last edited by chrisfig (2006-10-18 06:46:41)

chris (fig): i'm not random, i'm tangent oriented... :

Re: Printing from to control scale?

Hey Chris,

Would you be able to provide an .fla (stripped or complete) or the AS used in the file? Is it version 6,7,or 8, btw?

Re: Printing from to control scale?

Hey Bryan, i actually got it (more or less) figured out.

in flash you've got two print commands, print and printAsBitmap. printAsBitmap prints masked clips whereas print will print the entire clip. you also have, when using the "bmovie" parameter, a #p and #b designation, where #p is the frame to print and #b designates the bounding box.

so for my map i added a stop action to frame 1, then added an extra frame and created a simple mc called printBoundary, just a box that encompassed a bit larger area than the masked movieclip will occupy. I labeled that frame #b and labeled frame 1 #p, so that flash is printing frame 1 but looking at the print boundary on frame 2 (which the movie never goes to otherwise), and my print command reads:

printAsBitmap ("map_mc", "bmovie");

so there ya go. thanks for help offer in any case.

Last edited by chrisfig (2006-10-19 06:49:31)

chris (fig): i'm not random, i'm tangent oriented... :

Re: Printing from to control scale?

np smile Glad it worked out.