Carlos Barbosa
Carlos Barbosa

Reputation: 1432

How to print entire scene contents in Actionscript 3 for Flash Builder 4?

How do i print the entire scene contents to photographic paper?

Upvotes: 0

Views: 1357

Answers (1)

Carlos Barbosa
Carlos Barbosa

Reputation: 1432

i found the solution hours lately, behold a function that let's you print your scene contents in AS3, just by calling it:

private function printScreen():void

    {
        var printJob:PrintJob = new PrintJob();

        if ( !printJob.start() )
            return;

        printJob.addPage(Sprite(root));
        printJob.send()

        printJob = null;    

}

Just call it from a mouse/keyboard event and you're good to go.

Upvotes: 4

Related Questions