Solved

PrintJob help in CS3

Posted on 2011-09-30
1
239 Views
Last Modified: 2012-08-14
I have the code below in one form, and it prints perfectly, but how can I call that Form within my project (I know exactly from which SWF I am gonna call it, and post some variables to it)
What I want to do is:

1 - Call a NEW completely independent movie (_self) named impresion.swf (the form I wanna print)
2 - I am calling that form from calculate.swf, you guess right I want to be able to just print the results from this page :)

Thanx for any help or suggestions !!!
By the way I am using CS3 and AS2

import mx.controls.Button;
var printBut:Button;
var my_pj:PrintJob;

printBut.onPress = function() {
    // create PrintJob object
      
   my_pj = new PrintJob();
    if (my_pj.start()) {
        if (my_pj.addPage(_root)) {
            my_pj.send();
        }
    }
};
0
Comment
Question by:crescue
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 29

Accepted Solution

by:
dgofman earned 500 total points
ID: 36895613
Try this

import mx.controls.Button;

var printBut:Button;
var my_pj:PrintJob;
var movieHolder:MovieClip;

printBut.onPress = function() {
    if(movieHolder)
            movieHolder.removeMovieClip();
      movieHolder = _root.createEmptyMovieClip("movieHolder", _root.getNextHighestDepth());
      var loader:MovieClipLoader = new MovieClipLoader();    loader.addListener(_root);
    loader.loadClip("calculate.swf", movieHolder);
};

function onLoadInit(mc:MovieClip)
{
      my_pj = new PrintJob();
    if (my_pj.start()) {
        if (my_pj.addPage(mc)) {
            my_pj.send();
        }
    }
};
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question