Full error text:
at mx.printing::FlexPrintJob/addObject()[E:\dev\hero_private\frameworks\projects\framework\src\mx\printing\FlexPrintJob.as:252]
What caused the warning?
I was trying to print dynamically created image. The error occured in function addObject from FlexPrintJob class.
What is the solution?
You have to add printed object to a stage before you add it to FlexPrintJob.
addElement(image);
if (flexPrintJob.start() != true)
{
removeElement(image);
return;
}
flexPrintJob.addObject(image, FlexPrintJobScaleType.SHOW_ALL);
flexPrintJob.send();
removeElement(image);
Note that the printed object will not be visible on a stage even for a second because it’s immediately removed from the stage after sending to FlexPrintJob.