Solved

PrintJob help in CS3

Posted on 2011-09-30
1
232 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
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Youtube video error 30 836
private function works only without TabNavigator? 3 322
video live streaming 1 126
Could you point a workaround on how to open this Adobe Flash documents? 5 181
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

685 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