Hello everyone,
if I have 2 panels, each with their print buttons, can I simply have 
1 function for both buttons? This way, if I have 15 panels, I can 
only use one function for all the print buttons instead of 15...

This is my simplified script:

private function print(event:MouseEvent):void
{
    var Printbutton:FlexPrintJob = new FlexPrintJob();
    var printConfirmed:Boolean = Printbutton.start();           
    if(printConfirmed)
    {
        Printbutton.addObject(event.Target.???);
        Printbutton.send();
    }                           
}

<mx:Panel id="PanelTest001">
</mx:Panel>
<mx:Button label="print" click="print(event)"/>

<mx:Panel id="PanelTest002"/>
</mx:Panel>
<mx:Button label="print" click="print(event)"/>

Thank you very much.

Reply via email to