Print Button in Flash MX 2004

  • hireanil
  • Newbie
  • Newbie
  • User avatar
  • Posts: 5

Post 3+ Months Ago

Hi FlashGurus :idea: ,

Code: [ Select ]
on (release) {
    print("_root.#b", "bframe");------------------------print
    loadMovie("yes.swf", "_root.control");-----------load external movie
}
  1. on (release) {
  2.     print("_root.#b", "bframe");------------------------print
  3.     loadMovie("yes.swf", "_root.control");-----------load external movie
  4. }


:banghead: clicking on print button it prints the whole CBT i.e 50 pages, what do i do to stop this
OR
:arrow: how can i print the result page in Flash and also store it in TXT or some kind of datarecord format.
Thanks
Anils
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • tarafenton
  • Novice
  • Novice
  • tarafenton
  • Posts: 19
  • Loc: Fort Lauderdale, FL USA

Post 3+ Months Ago

Use the printJob Class instead of the print(). You can control what page you are trying to print. Put this code in the frame actionscript, my_print is the instance name of the print Button. You can have more than one .addPage
Code: [ Select ]
my_print.onRelease = function(){
    
  var my_pj:PrintJob = new PrintJob();
  var myResult:Boolean = my_pj.start();
   if(myResult) {
  
     my_pj.addPage("resultPage"); //change resultPage to the name or level of the movieClip you want to print    
     my_pj.send();
     }       
     delete my_pj;
   }
  1. my_print.onRelease = function(){
  2.     
  3.   var my_pj:PrintJob = new PrintJob();
  4.   var myResult:Boolean = my_pj.start();
  5.    if(myResult) {
  6.   
  7.      my_pj.addPage("resultPage"); //change resultPage to the name or level of the movieClip you want to print    
  8.      my_pj.send();
  9.      }       
  10.      delete my_pj;
  11.    }

Look in the live docs for additional print job class information
http://livedocs.macromedia.com/flash/mx ... 00580.html
Tara

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 13 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.