Solved

PrintJob help in CS3

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
IE 11 Flash Player issue 7 242
AWAY 3d Using BitMapCubeTexture 1 416
Array is not working ( AS2 ) 4 158
Windows 2008 Group Policy - An error occurred. Please try again later 2 96
Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
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…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

789 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