2D PrinJob empty Away3D view

Software: Away3D 4.x

andbat, Newbie
Posted: 28 May 2012 12:52 PM   Total Posts: 2

I have an application that consist of a 3D view and some 2D views. The problem occurs when I try to print one of the 2D views. The 3D view is empty after the printing has been accepted by the user.

I have replicated the problem with the Basic_Load3DS example in Away 3D. I added a red button for initiating the print job. The PrintJob prints the button and has nothing to do with the 3D view but the ant disappears after the printing is done.
You have to click OK in the printing dialogue that appears for the problem to occur.

You can try it out here

Here is the code that I added to the Basic_Load3DS example

private var _btn:Sprite;
protected function 
initExtra():void
{
 _btn 
= new Sprite();
 
addChild(_btn);
 
_btn.graphics.beginFill(0xff0000);
 
_btn.graphics.drawRect(00100100);
 
_btn.100;
 
_btn.addEventListener(MouseEvent.CLICK, print);
}
protected function print(e:Event):void
{
 
var tPJ:PrintJob = new PrintJob();
 if (
tPJ.start())
 
{
  tPJ
.addPage(_btn); //This line cause the problem
  
tPJ.send();
 
}

Nothing goes wrong if I comment out the line

tPJ.addPage(_btn); 

Any ideas on how to solve this problem? I’m in urgent need of a solution!

   

Richard Olsson, Administrator
Posted: 16 June 2012 01:44 PM   Total Posts: 1192   [ # 1 ]

Do you have a debug player? Are you getting any errors? It might be that the context is lost when the dialog opens, and that causes the View3D to break when it tries to render next time. This is a bug that was recently fixed in the release branch of the away3d-core-fp11 GitHub repository.

However, I’m unable to reproduce the issue in the example you’ve linked to, so I can’t confirm my suspicions.

What operating system are you seeing the issue on?

   

andbat, Newbie
Posted: 16 June 2012 02:27 PM   Total Posts: 2   [ # 2 ]

Thank you for your response.

I have the latest debug player and get no errors.

I tried compiling with the latest release branch from GitHub but the problem still occurs.

The view don’t go blank when the dialog opens, it freezes.
The view only goes blank when you click on the confirm button in the dialog.
If you click on cancel the view remains visible and unfreezes without any problem.
So you can’t click on cancel to reproduce the problem, you have to send the printjob to the printer for the error to appear.

I have tried this on Windows XP and 7 with the same result.

   

Richard Olsson, Administrator
Posted: 16 June 2012 02:40 PM   Total Posts: 1192   [ # 3 ]

I am unable to reproduce it on my Mac. It would be great if you could file an issue at http://github.com/away3d/away3d-core-fp11/issues referencing this thread and someone will take a look at it ASAP.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X