Trying to make a button that a user can use to print a specific document. I imagine it would start something like On release but that's about as far I can get! Flash help talks about printing movie clips - not what I am trying to do. Any help would be appreciated!
Mark
yell0wdart
09-24-2007, 04:08 PM
I'm not sure on the actual method you would use to send the document you're referencing to the printer from AS, but to actually code the button itself, you might be best off putting it inside a function, and adding an event listener method to it. Something along the lines of:
function printButton(evt:MouseEvent):void {
//function code will go here
//this is where you will issue the command to send the appropriate document to the printer
}
print_btn.addEventListener(MouseEvent.CLICK, printButton);
Again, I'm no uber developer. In fact, I'm still very much a nub when it comes to programming, but I'm learning. This would be the general structure that you'd use.
Bear in mind, that printButton, evt, and print_btn are not static names. You can name them whatever you like within the AS naming conventions. Just make sure that when you call the addEventListener method, that you're using the name that you've instantiated your Print button with on the stage.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.