Groups | Blog | Home
all groups > flash actionscript > february 2006 >

flash actionscript : printing single frames


mattroberts78
2/22/2006 8:33:05 PM
Is there a simple way to have flash only print one designated frame. I've
created an interactive map for my companies website and with each different
state the user selects, different information will show up at the bottom of my
stage. I'd like to create a print button that will print whatever information
is currently displayed and not all the graphics of the map. Some of the
information is in a scrollable box so I cant create a bounding box around just
that information. I tried to create an additional frame at the end of the
movie so that when the user clicks the print button the movie goes to that
frame, prints and then returns to the movie. I labeled that frame with a #p so
it will print only that frame. Problem is, when I start making more frames
with the #p it wants to print all of these. HELP
NomadicDesign
2/22/2006 9:06:15 PM
Hello,

My suggestion to you would be to use an offstage movieclip to load all the
content that you want to print. Simply create a movieclip with a dynamic
textField off to the left of your stage. Change the content of the text field
when the user clicks a different state.

To do the printing, I would use the PrintJob Class, not the #p property. You
have much more control this way. See
http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=194&thre
adid=1121621&forumid=15 for more information on using the PrintJob. I answered
a similar question toward the bottom of the tread.

Remember that you could also nest movieclips, meaning you could have a
movieclip full of images that change based on the users selection. This would
allow a bit of dynamic images to be printed as well.

Hope this helps,
Nomadic Design
AddThis Social Bookmark Button