Problem when printing

Publishing Print2Flash Documents embedding them in Flash movies
Post Reply
AzucenaTB
Posts:2
Joined:Thu May 14, 2009 1:42 pm
Problem when printing

Post by AzucenaTB » Thu May 14, 2009 6:55 pm

Hello friends first perdon by my English because i am Spanish and me what this translating a program, well my problem is to print the swf that I embedded in my page flash, me prints the page black (which is the color of my flash page) and me at the top left a cuadrito which is part of the document embedded print2flash, is if I put something more in the code or if there is something wrong

the code is

Code: Select all

function LoadPrint2FlashDoc(
    url, // Path of Print2Flash document to load
    x, // x coordinate of the Print2Flash document movie
    y, // y coordinate of the Print2Flash document movie
    width, // Width of Print2Flash document movie
    height, // Height of Print2Flash document movie
    name, // Instance name to assign the Print2Flash document movie
    parent, // Optional: parent object of Print2Flash document movie (default is _root)
    eventSink) // Optional: event handler object
{
    var intervalID = 0;
    if (!parent) parent=_root
    var container:MovieClip = parent.createEmptyMovieClip(name, 10);
    container._x=x;container._y=y

    var loadFunc = function()
    {
       if (!container.setSize) return;
       container.init(width, height);
       clearInterval(intervalID);
       eventSink.onLoaded(container);
       container.addListener(eventSink);
    }
   
    intervalID = setInterval(loadFunc, 100);
    var mcLoader:MovieClipLoader = new MovieClipLoader();
	mcLoader.addListener(this)
    mcLoader.loadClip(url, container);
    return container;
}

and the button

Code: Select all

on (release) {
	LoadPrint2FlashDoc("Legionella/D.swf",530,320,500,350, "D");
}

staff
Posts:267
Joined:Sat Dec 15, 2007 4:48 pm

Re: Problem when printing

Post by staff » Fri May 15, 2009 9:49 am

To print a Print2Flash document embedded in your own Flash movie you need to use printTheDocument Document API function so you need to use this code for printing:

Code: Select all

D.printTheDocument()
See also a Flash 8 sample from Print2Flash SDK which can be downloaded from http://print2flash.com/download.php (the sample is located in the DocumentAPI\Samples\Flash8 folder of SDK archive).

AzucenaTB
Posts:2
Joined:Thu May 14, 2009 1:42 pm

Re: Problem when printing

Post by AzucenaTB » Fri May 15, 2009 3:41 pm

The SWF makes it well, it embeds well in my flash page but to give to print leaves a small bottom margin and quoted margin it stops the background color of my page, I tested with many, always do this, even with your example and also clear in your example as the page has a white background goes well, but change the color and vereis as it appears the colored, margin need to know if this can be arranged in any way, you I have the image of your example with the margin

Post Reply