Re: [Flashcoders] printJob

2012-10-04 Thread Hans Wichman
Filters should show up in the debugger (or inspect it with 
monsterdebugger eg), custom classes should not be the problem

weirdness

On 4-10-2012 20:11, Ted Lehr wrote:

although I am using custom classes i.e. var headC:gridHead = new gridHead()

maybe that is what it is referring to


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com on behalf of Hans Wichman
Sent: Thu 10/4/2012 1:33 PM
To: Flash Coders List
Subject: Re: [Flashcoders] printJob
  
because your clip has a filter and its filtered dimensions are too large?


On 4-10-2012 19:25, Ted Lehr wrote:

So I have a sprite that has a child sprite with some objects in it... I am 
trying to print it with code like:

  if ( !printJob.start() )
  return;

  var origWid:Number = clip.width;
  clip.width = printJob.pageWidth;
  clip.scaleY = clip.scaleX;

  printJob.addPage(clip, new Rectangle(0, 0, printJob.pageWidth, 
printJob.pageHeight));

  printJob.send();

  printJob = null;

  clip.width = origWid;
  clip.scaleY = clip.scaleX;

My issue is that things do not always print - I get this error:


Warning: Filter will not render. The DisplayObject's filtered dimensions (6699, 
5824) are too large to be drawn.



Any thoughts on why it is not printing?


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] printJob

2012-10-04 Thread Ted Lehr
although I am using custom classes i.e. var headC:gridHead = new gridHead()

maybe that is what it is referring to


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com on behalf of Hans Wichman
Sent: Thu 10/4/2012 1:33 PM
To: Flash Coders List
Subject: Re: [Flashcoders] printJob
 
because your clip has a filter and its filtered dimensions are too large?

On 4-10-2012 19:25, Ted Lehr wrote:
> So I have a sprite that has a child sprite with some objects in it... I am 
> trying to print it with code like:
>
>  if ( !printJob.start() )
>  return;
>
>  var origWid:Number = clip.width;
>  clip.width = printJob.pageWidth;
>  clip.scaleY = clip.scaleX;
>
>  printJob.addPage(clip, new Rectangle(0, 0, printJob.pageWidth, 
> printJob.pageHeight));
>
>  printJob.send();
>
>  printJob = null;
>
>  clip.width = origWid;
>  clip.scaleY = clip.scaleX;
>
> My issue is that things do not always print - I get this error:
>
> Warning: Filter will not render. The DisplayObject's filtered dimensions 
> (6699, 5824) are too large to be drawn.
>
>
>
> Any thoughts on why it is not printing?
>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] printJob

2012-10-04 Thread Ted Lehr
Not filter that I am aware of...


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com on behalf of Hans Wichman
Sent: Thu 10/4/2012 1:33 PM
To: Flash Coders List
Subject: Re: [Flashcoders] printJob
 
because your clip has a filter and its filtered dimensions are too large?

On 4-10-2012 19:25, Ted Lehr wrote:
> So I have a sprite that has a child sprite with some objects in it... I am 
> trying to print it with code like:
>
>  if ( !printJob.start() )
>  return;
>
>  var origWid:Number = clip.width;
>  clip.width = printJob.pageWidth;
>  clip.scaleY = clip.scaleX;
>
>  printJob.addPage(clip, new Rectangle(0, 0, printJob.pageWidth, 
> printJob.pageHeight));
>
>  printJob.send();
>
>  printJob = null;
>
>  clip.width = origWid;
>  clip.scaleY = clip.scaleX;
>
> My issue is that things do not always print - I get this error:
>
> Warning: Filter will not render. The DisplayObject's filtered dimensions 
> (6699, 5824) are too large to be drawn.
>
>
>
> Any thoughts on why it is not printing?
>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] printJob

2012-10-04 Thread Hans Wichman

because your clip has a filter and its filtered dimensions are too large?

On 4-10-2012 19:25, Ted Lehr wrote:

So I have a sprite that has a child sprite with some objects in it... I am 
trying to print it with code like:

 if ( !printJob.start() )
 return;

 var origWid:Number = clip.width;
 clip.width = printJob.pageWidth;
 clip.scaleY = clip.scaleX;

 printJob.addPage(clip, new Rectangle(0, 0, printJob.pageWidth, 
printJob.pageHeight));

 printJob.send();

 printJob = null;

 clip.width = origWid;
 clip.scaleY = clip.scaleX;
   
My issue is that things do not always print - I get this error:


Warning: Filter will not render. The DisplayObject's filtered dimensions (6699, 
5824) are too large to be drawn.



Any thoughts on why it is not printing?


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] printJob

2012-10-04 Thread Ted Lehr
So I have a sprite that has a child sprite with some objects in it... I am 
trying to print it with code like:

if ( !printJob.start() )
return;

var origWid:Number = clip.width;
clip.width = printJob.pageWidth;
clip.scaleY = clip.scaleX;

printJob.addPage(clip, new Rectangle(0, 0, printJob.pageWidth, 
printJob.pageHeight));

printJob.send();

printJob = null;

clip.width = origWid;
clip.scaleY = clip.scaleX;
  
My issue is that things do not always print - I get this error:

Warning: Filter will not render. The DisplayObject's filtered dimensions (6699, 
5824) are too large to be drawn.



Any thoughts on why it is not printing?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] PrintJob - Mac vs. PC PDF error

2008-05-01 Thread Glen Pike

Hi,

   It sounds like you are going through the right process.

   Are you checking the return value of "PrintJob.addPage()"

   If it does not like what you are doing, it will return false, so you 
can catch this and maybe trace out an error to see if that is a problem
  
   I have just been using BitmapData to create a flat image of 
something I want to print and I found that I was ending up with blank 
pages unless I specified the 2nd "matrix" parameter of the 
BitmapData.draw method


   Don't know if that helps.

   PC's - you may need to install a PDF printer driver - like CutePDF 
Writer, which is free - unless you already have something there which 
does this.  Saying that I noticed that Vista has a Microsoft Printer 
Driver that will create images in XP? format - you can do the same thing 
with this to save paper...


   I would recommend trying another printer driver to make sure your 
current one is behaving properly and eliminate that as the problem.


   http://www.cutepdf.com/Products/CutePDF/writer.asp

   Glen

  


Radley Marx wrote:



Thnx Glen,

I forgot to mention this is AS2 (an old project). No Flex involved, 
just Flash Player 8 (& above).



So, PrintJob offers the ability to spread out a large image over 
several pages. This works fine.


The trickier part is a printout that requires a header MC and footer 
MC with each page (this is for a building diagram). By header I mean 
the header contains title, logo, and other stuff. The footer is a 
legend with parts and specs.


Initially I tried to do this after PrintJob was fired, so I could know 
the size of the printout, but the extra frame needed for the new MCs 
to load caused the PrintJob to fail. As a workaround, prior to calling 
PrintJob, I calculate and layout pages for the most common formats.


How do I make the pages? There's a couple of extra steps involved, but 
this is the basic idea: I first add the header and footer to a new 
page MC. Then I add in a portion of the diagram (via BitmapData) in 
the middle of the page. This is done for as many pages as needed.


Then when I call PrintJob, I don't need to slice and dice... I just 
print a stack of page MCs.





For testing, we're not actually printing out on paper, we're just 
creating PDF print-previews.



So, regular slice and dice multi-page PDFs in PrintJob works fine. 
Also, creating a single page PDF with header and footer works fine, 
however a PD error message does pop up on PCs (but not on Macs).


For a stack of pages (with header): PDFs are fine on my Mac but fail 
on PC, showing only a single blank page.



I'm not familiar with PDF printing on PCs. It's just built-in for OSX 
so I assume that's the same for PC.



-radley






On May 1, 2008, at 6:28 AM, Glen Pike wrote:


Hi,

  I have been doing some work with PrintJob in AS2 & Flex recently.

  I managed to get it working okay for single pages in AS2 and 2 page 
spreads in AS3, not sure what you mean by a PDF error, but are you 
sure it's not your "printer" driver.  I have been using "CutePDF 
Writer" which has been fine on the PC.  For Mac, I think it was the 
Acrobat printer, but not 100% as it was a friends computer.


  Can you be more specific about the error - does it occur when 
printing, or is it when you open the resulting PDF?


  I have not done "header" & "footers" yet, but I guess this is just 
a case of making up your MovieClip / Sprite to include these, so 
should not have much of a bearing...


  Glen

Radley Marx wrote:




Hey all,

I have a project containing a diagram that needs to be printed. 
Often the diagram is too large for a single page, so it's 
sliced/spread over multiple pages. Further, there's an option that 
the page may include a header and footer.


The code was all developed and tested on a Mac and works great.

When we print on a PC, we get a PDF error. In most cases the print 
will still work, but in one specific case (multi-page with 
header/footer) it doesn't work at all on PC.


Curious if anyone has seen this issue before...

Thnx!

-radley





-- 


Radley Marx
www.radleymarx.com
[EMAIL PROTECTED]
-- 






___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




--

Glen Pike
01326 218440
www.glenpike.co.uk 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




--

Glen Pike
01326 218440
www.glenpike.co.uk 

___
Flashcoders m

Re: [Flashcoders] PrintJob - Mac vs. PC PDF error

2008-05-01 Thread Radley Marx



Thnx Glen,

I forgot to mention this is AS2 (an old project). No Flex involved,  
just Flash Player 8 (& above).



So, PrintJob offers the ability to spread out a large image over  
several pages. This works fine.


The trickier part is a printout that requires a header MC and footer  
MC with each page (this is for a building diagram). By header I mean  
the header contains title, logo, and other stuff. The footer is a  
legend with parts and specs.


Initially I tried to do this after PrintJob was fired, so I could know  
the size of the printout, but the extra frame needed for the new MCs  
to load caused the PrintJob to fail. As a workaround, prior to calling  
PrintJob, I calculate and layout pages for the most common formats.


How do I make the pages? There's a couple of extra steps involved, but  
this is the basic idea: I first add the header and footer to a new  
page MC. Then I add in a portion of the diagram (via BitmapData) in  
the middle of the page. This is done for as many pages as needed.


Then when I call PrintJob, I don't need to slice and dice... I just  
print a stack of page MCs.





For testing, we're not actually printing out on paper, we're just  
creating PDF print-previews.



So, regular slice and dice multi-page PDFs in PrintJob works fine.  
Also, creating a single page PDF with header and footer works fine,  
however a PD error message does pop up on PCs (but not on Macs).


For a stack of pages (with header): PDFs are fine on my Mac but fail  
on PC, showing only a single blank page.



I'm not familiar with PDF printing on PCs. It's just built-in for OSX  
so I assume that's the same for PC.



-radley






On May 1, 2008, at 6:28 AM, Glen Pike wrote:


Hi,

  I have been doing some work with PrintJob in AS2 & Flex recently.

  I managed to get it working okay for single pages in AS2 and 2  
page spreads in AS3, not sure what you mean by a PDF error, but are  
you sure it's not your "printer" driver.  I have been using "CutePDF  
Writer" which has been fine on the PC.  For Mac, I think it was the  
Acrobat printer, but not 100% as it was a friends computer.


  Can you be more specific about the error - does it occur when  
printing, or is it when you open the resulting PDF?


  I have not done "header" & "footers" yet, but I guess this is just  
a case of making up your MovieClip / Sprite to include these, so  
should not have much of a bearing...


  Glen

Radley Marx wrote:




Hey all,

I have a project containing a diagram that needs to be printed.  
Often the diagram is too large for a single page, so it's sliced/ 
spread over multiple pages. Further, there's an option that the  
page may include a header and footer.


The code was all developed and tested on a Mac and works great.

When we print on a PC, we get a PDF error. In most cases the print  
will still work, but in one specific case (multi-page with header/ 
footer) it doesn't work at all on PC.


Curious if anyone has seen this issue before...

Thnx!

-radley





--
Radley Marx
www.radleymarx.com
[EMAIL PROTECTED]
--




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




--

Glen Pike
01326 218440
www.glenpike.co.uk 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] PrintJob - Mac vs. PC PDF error

2008-05-01 Thread Glen Pike

Hi,

   I have been doing some work with PrintJob in AS2 & Flex recently.

   I managed to get it working okay for single pages in AS2 and 2 page 
spreads in AS3, not sure what you mean by a PDF error, but are you sure 
it's not your "printer" driver.  I have been using "CutePDF Writer" 
which has been fine on the PC.  For Mac, I think it was the Acrobat 
printer, but not 100% as it was a friends computer.


   Can you be more specific about the error - does it occur when 
printing, or is it when you open the resulting PDF?


   I have not done "header" & "footers" yet, but I guess this is just a 
case of making up your MovieClip / Sprite to include these, so should 
not have much of a bearing...


   Glen

Radley Marx wrote:




Hey all,

I have a project containing a diagram that needs to be printed. Often 
the diagram is too large for a single page, so it's sliced/spread over 
multiple pages. Further, there's an option that the page may include a 
header and footer.


The code was all developed and tested on a Mac and works great.

When we print on a PC, we get a PDF error. In most cases the print 
will still work, but in one specific case (multi-page with 
header/footer) it doesn't work at all on PC.


Curious if anyone has seen this issue before...

Thnx!

-radley





-- 


Radley Marx
www.radleymarx.com
[EMAIL PROTECTED]
-- 






___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




--

Glen Pike
01326 218440
www.glenpike.co.uk 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] PrintJob - Mac vs. PC PDF error

2008-05-01 Thread Radley Marx




Hey all,

I have a project containing a diagram that needs to be printed. Often  
the diagram is too large for a single page, so it's sliced/spread over  
multiple pages. Further, there's an option that the page may include a  
header and footer.


The code was all developed and tested on a Mac and works great.

When we print on a PC, we get a PDF error. In most cases the print  
will still work, but in one specific case (multi-page with header/ 
footer) it doesn't work at all on PC.


Curious if anyone has seen this issue before...

Thnx!

-radley





--
Radley Marx
www.radleymarx.com
[EMAIL PROTECTED]
--




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] PrintJob

2008-04-30 Thread Rich Shupe
Glen, just a wild guess, but maybe switching to printAsBitmap will help.
This may be unavoidable if the cached bitmap is used for the filter but not
for the printing. If so, you'll just need to create a BitmapData object of
everything you want to print.

Rich
http://www.LearningActionScript3.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] PrintJob

2008-04-30 Thread Glen Pike

Hi,

   I am doing some work with the PrintJob to print a movieclip.

   This movieclip has a child clip with filters applied at design time.

   The filters show up in the clip on stage, but not in my printed 
image - I am printing to PDF.


   Am I missing something out here??

   The example is here - pick some random settings and then on the page 
"5", the large white bordered illustration is what gets printed, you 
should see the drop shadow & blur applied to the text...


   http://glenpike.co.uk/SOS/certificate.html

   Thanks

   Glen
--

Glen Pike
01326 218440
www.glenpike.co.uk 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] printJob, orientation and rotation or scaling issues

2007-05-02 Thread Dave Wood

Thanks guys

Steven, I've played around with your code and got it working on my  
setup but will need to test later in the day on the computer/printer  
combination that was causing the problems.


I needed to modify it though because your code assumes the clip is  
scaled at 100% to start with. In my case it's not.


You could make your code more generic by adding at the start...

var originalScale:Number = mc._xscale;
mc._xscale = mc._yscale = 100;

...and then after printing, instead of setting the scale back to 100...

mc._xscale = mc._yscale = originalScale;


Or there's probably a way of leaving the scale as it is and fiddling  
around with the maths in the rest of the code - but that's too hard  
for this time of day!


Cheers

David



On 2/05/2007, at 9:31 PM, Steven Sacks wrote:


I cover this topic on my blog.  :)

http://www.stevensacks.net/2007/03/16/force-landscape-printing-with- 
printjob/

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] printJob, orientation and rotation or scaling issues

2007-05-02 Thread Hans Wichman

http://objectpainters.com/blog/?p=9



On 5/2/07, Dave Wood <[EMAIL PROTECTED]> wrote:


Hi

I'm having problems correctly rotating a movieclip to accomodate
users printing in either portrait or landscape format.

There was a thread about this maybe 4 to 6 weeks ago and I'm unable
to locate it in the archives. If anyone recalls that, would they mind
pointing me to it?

The item to print is a landscape formatted movieClip and I'm wanting
to rotate and scale it so that users with print setup to portrait
will still print it OK.

Here's my code which works OK on some machines but not others.
MovieClip to print is postcardClip and it's normal size is much
smaller than  page size...

   var myPrintJob:PrintJob = new PrintJob();
   var notCancelled:Boolean = myPrintJob.start();
   if (notCancelled){
   var startScaleX:Number = postcardClip._xscale;
   var startScaleY:Number = postcardClip._yscale;
   if (myPrintJob.orientation == "portrait"){ // NEED TO
ROTATE
   postcardClip._rotation = 270;
   }
   postcardClip._xscale = 180;
   postcardClip._yscale = 180;
   myPrintJob.addPage(postcardClip);
   myPrintJob.send();
   postcardClip._rotation = 0;
   postcardClip._xscale = startScaleX;
   postcardClip._yscale = startScaleY;
   }
   delete myPrintJob;

What's happening is that on some computer/printer combinations, a
triangular portion (half the image) is printing correctly with the
other triangular half printing as solid triangular block. I suspect
something wrong with the scaling part of my code.

Any help appreciated.

David
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] printJob, orientation and rotation or scaling issues

2007-05-02 Thread Steven Sacks

I cover this topic on my blog.  :)

http://www.stevensacks.net/2007/03/16/force-landscape-printing-with-printjob/ 


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] printJob, orientation and rotation or scaling issues

2007-05-02 Thread Gregory N

Hi David,

I'd try to use PrintJob.pageWidth and/or PrintJob.pageHeight instead of
.orientation .
Also, why not determine needed scale at runtime:
postcardClip._xscale = 100 * myPrintJob.pageWidth/postcardClip._width;
postcardClip._yscale = postcardClip._xscale;


--
--
Best regards,
GregoryN

http://GOusable.com
Flash components development.
Usability services.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] printJob, orientation and rotation or scaling issues

2007-05-01 Thread Dave Wood

Hi

I'm having problems correctly rotating a movieclip to accomodate  
users printing in either portrait or landscape format.


There was a thread about this maybe 4 to 6 weeks ago and I'm unable  
to locate it in the archives. If anyone recalls that, would they mind  
pointing me to it?


The item to print is a landscape formatted movieClip and I'm wanting  
to rotate and scale it so that users with print setup to portrait  
will still print it OK.


Here's my code which works OK on some machines but not others.  
MovieClip to print is postcardClip and it's normal size is much  
smaller than  page size...


var myPrintJob:PrintJob = new PrintJob();
var notCancelled:Boolean = myPrintJob.start();
if (notCancelled){
var startScaleX:Number = postcardClip._xscale;
var startScaleY:Number = postcardClip._yscale;
if (myPrintJob.orientation == "portrait"){ // NEED TO ROTATE
postcardClip._rotation = 270;
}
postcardClip._xscale = 180;
postcardClip._yscale = 180;
myPrintJob.addPage(postcardClip);
myPrintJob.send();
postcardClip._rotation = 0;
postcardClip._xscale = startScaleX;
postcardClip._yscale = startScaleY;
}
delete myPrintJob;

What's happening is that on some computer/printer combinations, a  
triangular portion (half the image) is printing correctly with the  
other triangular half printing as solid triangular block. I suspect  
something wrong with the scaling part of my code.


Any help appreciated.

David
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] PrintJob acting weird

2007-04-12 Thread Flap Flap

Hi there,

I got a simple code to print a mc.
This mc is special for printable content and not show (_visible = false)

Here is my print code :

var pj : PrintJob = new PrintJob();
   if (pj.start()) {
   pj.addPage( view.mcPrint, null,  {printAsBitmap:Boolean});
   pj.send();
   }
   delete pj;

Quiet simple...

Offline on local test eveything is ok.

Online on the testing webserver, printing set all the swf to black (!!) and
player say "Movie not loaded" (Translated from french maybe not the exact
message)

If I do not do the send and not set the printAsBitmap option, printing dont
set the swf to black but not print some content (text not in dynamic field)

Very strange I think ! Any clue ?

--
Benoît Milgram / Flapflap
http://www.kilooctet.net
___
[EMAIL PROTECTED]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

[Flashcoders] PrintJob and dynamic functionality

2006-11-08 Thread David Cohn

Hey all,

I'm trying to use the printJob class (AS 2.0) to print a page with a  
dynamically drawn chart, something like:


	mc_pp = _root.createEmptyMovieClip("printbox",  
this.getNextHighestDepth());
	mc_pp.attachMovie("printPage"+i, "printPage", 100, {_x:-1000,  
_y:-1000});


// ... call some routines which draw a chart

mc_pj = new PrintJob();
if (mc_pj.start()) {
if (mc_pj.addPage("printbox",null,null,1)) {
print("page added successfully!");
mc_pj.send();
}
}
_root.mc_pp.removeMovieClip();
delete mc_pj;


I've tried many variations of this, including calling "addPage" on a  
callback from the movieClip after initializing, on frame 3 or so.   
The movieclip is rendered correctly on stage in all cases, but the  
printed job shows the movieClip as it appears before any actionScript  
is executed (or blank, e.g. in the case of a callback).


Am I missing something simple?
Does anyone have an example of printing a movieClip that needs to  
initialize before printing?


Thanks,
--Dave

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] PRINTJOB HELL, PRINTJOB NIGHTMARE with several PAGES

2006-08-21 Thread Meinte van't Kruis

Very cool idea Haikal! Certainly seems the best option for text printing,
I'm going to try it one day.

thanks,
-Meinte

On 8/21/06, Haikal Saadh <[EMAIL PROTECTED]> wrote:


My approach to printing oodles of multiline text is to let the browser
do it:

* When the print button is pressed, save the contents of the text
  field to a Local Shared Object
* Open up an empty HTML page, which has as invisible flash movie
  which can then:
  o Read that shared object.
  o Pass the data that needs to be printed to a JS function
which...
  o ...uses DOM to inject that data onto the page.

Simple, and quite elegant, if I say so my self. I've done this before
for arrays of objects, and it has worked a treat. The Flash/Javascript
bridge comes in handy here as well.



Peter O'Brien wrote:
> I have the same problem as the original poster.
>
> I don't suppose anyone can provide more info as a solution than Hans, or
> Hans if you're there I would love to see some code.
>
> What are flash mc dimensions to match an A4 page?  Doesn't it vary
> according
> to screen resolution?
>
> How can you efficiently fill a textfield to the point in which you
> know it
> is completely full?
>
> Cheers,
> Pete



--
Haikal Saadh
Applications Programmer
ICT Resources, TALSS
QUT Kelvin Grove
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] PRINTJOB HELL, PRINTJOB NIGHTMARE with several PAGES

2006-08-20 Thread Haikal Saadh

My approach to printing oodles of multiline text is to let the browser
do it:

   * When the print button is pressed, save the contents of the text
 field to a Local Shared Object
   * Open up an empty HTML page, which has as invisible flash movie
 which can then:
 o Read that shared object.
 o Pass the data that needs to be printed to a JS function which...
 o ...uses DOM to inject that data onto the page.

Simple, and quite elegant, if I say so my self. I've done this before
for arrays of objects, and it has worked a treat. The Flash/Javascript
bridge comes in handy here as well.



Peter O'Brien wrote:

I have the same problem as the original poster.

I don't suppose anyone can provide more info as a solution than Hans, or
Hans if you're there I would love to see some code.

What are flash mc dimensions to match an A4 page?  Doesn't it vary 
according

to screen resolution?

How can you efficiently fill a textfield to the point in which you 
know it

is completely full?

Cheers,
Pete




--
Haikal Saadh
Applications Programmer
ICT Resources, TALSS
QUT Kelvin Grove
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] PRINTJOB HELL, PRINTJOB NIGHTMARE with several PAGES

2006-08-20 Thread Peter O'Brien

Hey guys thanks for the code and input.

The route I think I'm taking because it's html text and formatted, is to
keep trimming at 's and checking if page is not too high.

The page to print symbol I'm using has an aspect ratio for an A4 page (1:
1.414) and one big html text field (with 20px blank padding around it)

Here's the code (which works) so far:


private function processPagesToPrint():Void
   {
   _pagesToPrint=[];
   _excessText=entireHtmlFormattedTextContent;// can be a few lines or
pages
   constructPage();
   }

   private function constructPage():Void
   {
   var pageToPrint=this.attachMovie
('pageToPrint_justText','p'+(_pagesToPrint.length+1),getNextHighestDepth(),{_x:720});
   _pagesToPrint.push(pageToPrint);
   var tf:TextField=pageToPrint.tf;
   tf.styleSheet=STYLESHEET;
   tf.htmlText=_excessText;
   // if the page is not too high without having to trim we're good to
go
   if(tf.textHeight<=tf._height){
   trace('pages processed, and number to print
='+_pagesToPrint.length);
   // display this info to user so they know before they hit print
   }
   // otherwise we'll trim and then construct another page
   else{
   _excessText="";
   trimPage(tf);
   }
   }

   private function trimPage(tf:TextField):Void
   {
   // cut the text after the last ''
   var str:String=tf.htmlText;
   var lastBr=str.lastIndexOf('');
   tf.htmlText=str.substring(0,lastBr);
   _excessText=str.substring(lastBr,str.length)+_excessText;
   // if page is trimmed enough
   if(tf.textHeight<=tf._height){
   constructPage();
   }
   // otherwise keep trimmin
   else{
   trimPage(tf);
   }
   }

   private function printPages():Void
   {
   _printJob=new PrintJob();
   if(_printJob.start()){
   var len=_pagesToPrint.length;
   for(var i=0;i wrote:


> How can you efficiently fill a textfield to the point in which you know
it
> is completely full?

Here's a revised version using a word array. But as I said, including
formatting would be more difficult and significantly slower. I tend to
agree
with Meinte that in this case you're better off using scrolling (although
the function below may be of interest in any case)

function fillField(fld:TextField, txt:Array, curr:String) {
if (curr == undefined) {
curr = "";
}
var len:Number = txt.length;
if (len == 0) {
} else if (len == 1) {
fld.text = curr + txt[0];
if (fld.textHeight > fld._height) {
fld.text = curr;
}
} else {
var half:Array = txt.slice(0, len / 2);
fld.text = curr + half.join(" ");
if (fld.textHeight > fld._height) {
fillField(fld, half, curr);
} else {
fillField(fld, txt.slice(len / 2), fld.text + "
");
}
}
}

I tested it with
fillField(test, src.text.split(" "));

Danny

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] PRINTJOB HELL, PRINTJOB NIGHTMARE with several PAGES

2006-08-18 Thread Danny Kodicek
> How can you efficiently fill a textfield to the point in which you know it
> is completely full?

Here's a revised version using a word array. But as I said, including
formatting would be more difficult and significantly slower. I tend to agree
with Meinte that in this case you're better off using scrolling (although
the function below may be of interest in any case)

function fillField(fld:TextField, txt:Array, curr:String) {
if (curr == undefined) {
curr = "";
}
var len:Number = txt.length;
if (len == 0) {
} else if (len == 1) {
fld.text = curr + txt[0];
if (fld.textHeight > fld._height) {
fld.text = curr;
}
} else {
var half:Array = txt.slice(0, len / 2);
fld.text = curr + half.join(" ");
if (fld.textHeight > fld._height) {
fillField(fld, half, curr);
} else {
fillField(fld, txt.slice(len / 2), fld.text + " ");
}
}
}

I tested it with
fillField(test, src.text.split(" "));

Danny

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] PRINTJOB HELL, PRINTJOB NIGHTMARE with several PAGES

2006-08-18 Thread Danny Kodicek

> I have the same problem as the original poster.
>
> I don't suppose anyone can provide more info as a solution than Hans, or
> Hans if you're there I would love to see some code.
>
> What are flash mc dimensions to match an A4 page?  Doesn't it
> vary according
> to screen resolution?

As long as it's the right aspect ratio (1:1.414), it should scale up
correctly

>
> How can you efficiently fill a textfield to the point in which you know it
> is completely full?

It depends on how much you know about the contents. If you know the text is
all of a single line-height and not wrapping, then you can do it very
quickly. If you don't know any of these things then you have to do it by
trial and error (no equivalent in Flash of Director's lovely locToCharPos
function, unfortunately). A simple and quick recursive method is:

function fillField(fld:TextField, txt:String, curr:String) {
if (curr == undefined) {
curr = "";
}
var len:Number = txt.length;
if (len == 0) {
} else if (len == 1) {
fld.text = curr + txt;
if (fld.textHeight > fld._height) {
fld.text = curr;
}
} else {
var half:String = txt.substr(0, len / 2);   
fld.text = curr + half;
if (fld.textHeight > fld._height) {
fillField(fld, half, curr);
} else {
fillField(fld, txt.substr(len / 2), curr + half);
}
}
}


However, this literally fills the field as far as it will go, up to the very
last letter; and of course it doesn't respect formatting. The same principle
can be applied with formatting, but it gets more complicated. To make it
respect word breaks, it would probably be simplest to convert the text to an
array of words.

Danny

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] PRINTJOB HELL, PRINTJOB NIGHTMARE with several PAGES

2006-08-18 Thread Meinte van't Kruis

_root.test is the textfield, _root.line_length is the lines fitting on one
page.

good luck!

-Meinte

On 8/18/06, Meinte van't Kruis <[EMAIL PROTECTED]> wrote:


my solution is scrolling the text and printing as you go, here's the
function.
(beware though, it's been ages since writing this, it works tho)

function buildPrinter() {
_root.print.onPress = function() {
var p_length = Math.round(Math.floor
(parseInt(_root.test.maxscroll)/_root.line_length));
_root.pj = new PrintJob();
if (_root.pj.start()) {
//_root.printer.pj=pj;
for (var i = 0; i<=p_length; i++) {
_root.test.scroll = i*_root.line_length;
_root.pj.addPage(_root.test);
}
var empty =
((p_length+1)*_root.line_length)-_root.test.maxscroll;
for (var i = 0; i wrote:
>
> Yeah, I asked this question on Flexcoders but got no answer at all.
> Any code would be greatly appreciated :)
>
> The funny thing is this printing a block of multipage text seems like
> such a basic thing but there are no examples in the docs and it seems
> as thought this issue was never considered as a basic thing people
> would need to do.
>
> Regards,
> Hank
>
> On 8/18/06, Peter O'Brien <[EMAIL PROTECTED]> wrote:
> > I have the same problem as the original poster.
> >
> > I don't suppose anyone can provide more info as a solution than Hans,
> or
> > Hans if you're there I would love to see some code.
> >
> > What are flash mc dimensions to match an A4 page?  Doesn't it vary
> according
> > to screen resolution?
> >
> > How can you efficiently fill a textfield to the point in which you
> know it
> > is completely full?
> >
> > Cheers,
> > Pete
> >
> >
> > On 4/24/06, Van De Velde Hans < [EMAIL PROTECTED]> wrote:
> > >
> > > You get your text from the textarea and you do this:
> > >
> > > Dynamically attach a movieclip from the library with a preformatted
> > > textfield that exactly fits an A4 page (set movieclip to _visible =
> false
> > > to
> > > do it invisibly)
> > > and fill the textfield up with the text from your textarea until the
> > > textfield is full.
> > >
> > > Then you add to movieclip to the printjob and push the reference to
> the
> > > movieclip to an array.
> > >
> > > Cut the remaining text and fill up the next one...
> > > Create a loop of this to write out all your text.
> > >
> > > After all text is written out, you execute the printjob and remove
> all
> > > the movieclips with removeMovieClip by looping the array of
> movieclips.
> > >
> > > NOTE : this is easier than it seems.
> > >
> > >
> > > Been there, done that,
> > >
> > > Regards,
> > >
> > > Hans.
> > >
> > >
> > >
> > >
> > > -Original Message-
> > > From: [EMAIL PROTECTED]
> > > [mailto:[EMAIL PROTECTED] ] On Behalf Of
> julian
> > > atienza
> > > Sent: maandag 24 april 2006 17:26
> > > To: flashcoders@chattyfig.figleaf.com
> > > Subject: [Flashcoders] PRINTJOB HELL, PRINTJOB NIGHTMARE with
> several
> > > PAGES
> > >
> > > Hi.
> > > I wanted to Print contents of a long Scrollable textArea  with
> Flash, but
> > > it's a kind of nightmare.
> > >
> > > I tried to made a class to manage Printing (with a PrintJob object
> inside)
> > > ,
> > > and one empty swf that Creates Dynamically the TextArea and the
> Class to
> > > ManagePrinting, who feeds textArea with contents and scroll TextArea
> > > adding
> > > page by page contents.
> > >
> > > Problems:
> > >
> > > - The Scrolled area in Screen doesn't appeared to be the same than
> the
> > > printable area (each Page, i see repeated contents... why? i just
> don't
> > > know
> > > . IT's like the scroll doesn't scroll propertly).
> > >
> > > - Of course, sometimes, appeared incomplete text (with a cut at the
> > > middle)
> > > because i don't know any mechanism to avoid it at the moment.
> > >
> > >
> > > Somebody have any idea -> the contents to print will be sometimes of
> 5 or
> > > 6
> > > pages DIN A-4
> > >
> > > thanks in advance
> > > ___
> > > Flashcoders@chattyfig.figleaf.com

Re: [Flashcoders] PRINTJOB HELL, PRINTJOB NIGHTMARE with several PAGES

2006-08-18 Thread Meinte van't Kruis

my solution is scrolling the text and printing as you go, here's the
function.
(beware though, it's been ages since writing this, it works tho)

function buildPrinter() {
   _root.print.onPress = function() {
   var p_length = Math.round(Math.floor
(parseInt(_root.test.maxscroll)/_root.line_length));
   _root.pj = new PrintJob();
   if (_root.pj.start()) {
   //_root.printer.pj=pj;
   for (var i = 0; i<=p_length; i++) {
   _root.test.scroll = i*_root.line_length;
   _root.pj.addPage(_root.test);
   }
   var empty =
((p_length+1)*_root.line_length)-_root.test.maxscroll;
   for (var i = 0; i wrote:


Yeah, I asked this question on Flexcoders but got no answer at all.
Any code would be greatly appreciated :)

The funny thing is this printing a block of multipage text seems like
such a basic thing but there are no examples in the docs and it seems
as thought this issue was never considered as a basic thing people
would need to do.

Regards,
Hank

On 8/18/06, Peter O'Brien <[EMAIL PROTECTED]> wrote:
> I have the same problem as the original poster.
>
> I don't suppose anyone can provide more info as a solution than Hans, or
> Hans if you're there I would love to see some code.
>
> What are flash mc dimensions to match an A4 page?  Doesn't it vary
according
> to screen resolution?
>
> How can you efficiently fill a textfield to the point in which you know
it
> is completely full?
>
> Cheers,
> Pete
>
>
> On 4/24/06, Van De Velde Hans <[EMAIL PROTECTED]> wrote:
> >
> > You get your text from the textarea and you do this:
> >
> > Dynamically attach a movieclip from the library with a preformatted
> > textfield that exactly fits an A4 page (set movieclip to _visible =
false
> > to
> > do it invisibly)
> > and fill the textfield up with the text from your textarea until the
> > textfield is full.
> >
> > Then you add to movieclip to the printjob and push the reference to
the
> > movieclip to an array.
> >
> > Cut the remaining text and fill up the next one...
> > Create a loop of this to write out all your text.
> >
> > After all text is written out, you execute the printjob and remove all
> > the movieclips with removeMovieClip by looping the array of
movieclips.
> >
> > NOTE : this is easier than it seems.
> >
> >
> > Been there, done that,
> >
> > Regards,
> >
> > Hans.
> >
> >
> >
> >
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of julian
> > atienza
> > Sent: maandag 24 april 2006 17:26
> > To: flashcoders@chattyfig.figleaf.com
> > Subject: [Flashcoders] PRINTJOB HELL, PRINTJOB NIGHTMARE with several
> > PAGES
> >
> > Hi.
> > I wanted to Print contents of a long Scrollable textArea  with Flash,
but
> > it's a kind of nightmare.
> >
> > I tried to made a class to manage Printing (with a PrintJob object
inside)
> > ,
> > and one empty swf that Creates Dynamically the TextArea and the Class
to
> > ManagePrinting, who feeds textArea with contents and scroll TextArea
> > adding
> > page by page contents.
> >
> > Problems:
> >
> > - The Scrolled area in Screen doesn't appeared to be the same than the
> > printable area (each Page, i see repeated contents... why? i just
don't
> > know
> > . IT's like the scroll doesn't scroll propertly).
> >
> > - Of course, sometimes, appeared incomplete text (with a cut at the
> > middle)
> > because i don't know any mechanism to avoid it at the moment.
> >
> >
> > Somebody have any idea -> the contents to print will be sometimes of 5
or
> > 6
> > pages DIN A-4
> >
> > thanks in advance
> > ___
> > Flashcoders@chattyfig.figleaf.com
> > To change your subscription options or search the archive:
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com
> > http://training.figleaf.com
> >
> > ___
> > Flashcoders@chattyfig.figleaf.com
> > To change your subscription options or search the archive:
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com
> > http://training.figleaf

Re: [Flashcoders] PRINTJOB HELL, PRINTJOB NIGHTMARE with several PAGES

2006-08-18 Thread hank williams

Yeah, I asked this question on Flexcoders but got no answer at all.
Any code would be greatly appreciated :)

The funny thing is this printing a block of multipage text seems like
such a basic thing but there are no examples in the docs and it seems
as thought this issue was never considered as a basic thing people
would need to do.

Regards,
Hank

On 8/18/06, Peter O'Brien <[EMAIL PROTECTED]> wrote:

I have the same problem as the original poster.

I don't suppose anyone can provide more info as a solution than Hans, or
Hans if you're there I would love to see some code.

What are flash mc dimensions to match an A4 page?  Doesn't it vary according
to screen resolution?

How can you efficiently fill a textfield to the point in which you know it
is completely full?

Cheers,
Pete


On 4/24/06, Van De Velde Hans <[EMAIL PROTECTED]> wrote:
>
> You get your text from the textarea and you do this:
>
> Dynamically attach a movieclip from the library with a preformatted
> textfield that exactly fits an A4 page (set movieclip to _visible = false
> to
> do it invisibly)
> and fill the textfield up with the text from your textarea until the
> textfield is full.
>
> Then you add to movieclip to the printjob and push the reference to the
> movieclip to an array.
>
> Cut the remaining text and fill up the next one...
> Create a loop of this to write out all your text.
>
> After all text is written out, you execute the printjob and remove all
> the movieclips with removeMovieClip by looping the array of movieclips.
>
> NOTE : this is easier than it seems.
>
>
> Been there, done that,
>
> Regards,
>
> Hans.
>
>
>
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of julian
> atienza
> Sent: maandag 24 april 2006 17:26
> To: flashcoders@chattyfig.figleaf.com
> Subject: [Flashcoders] PRINTJOB HELL, PRINTJOB NIGHTMARE with several
> PAGES
>
> Hi.
> I wanted to Print contents of a long Scrollable textArea  with Flash, but
> it's a kind of nightmare.
>
> I tried to made a class to manage Printing (with a PrintJob object inside)
> ,
> and one empty swf that Creates Dynamically the TextArea and the Class to
> ManagePrinting, who feeds textArea with contents and scroll TextArea
> adding
> page by page contents.
>
> Problems:
>
> - The Scrolled area in Screen doesn't appeared to be the same than the
> printable area (each Page, i see repeated contents... why? i just don't
> know
> . IT's like the scroll doesn't scroll propertly).
>
> - Of course, sometimes, appeared incomplete text (with a cut at the
> middle)
> because i don't know any mechanism to avoid it at the moment.
>
>
> Somebody have any idea -> the contents to print will be sometimes of 5 or
> 6
> pages DIN A-4
>
> thanks in advance
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] PRINTJOB HELL, PRINTJOB NIGHTMARE with several PAGES

2006-08-18 Thread Peter O'Brien

I have the same problem as the original poster.

I don't suppose anyone can provide more info as a solution than Hans, or
Hans if you're there I would love to see some code.

What are flash mc dimensions to match an A4 page?  Doesn't it vary according
to screen resolution?

How can you efficiently fill a textfield to the point in which you know it
is completely full?

Cheers,
Pete


On 4/24/06, Van De Velde Hans <[EMAIL PROTECTED]> wrote:


You get your text from the textarea and you do this:

Dynamically attach a movieclip from the library with a preformatted
textfield that exactly fits an A4 page (set movieclip to _visible = false
to
do it invisibly)
and fill the textfield up with the text from your textarea until the
textfield is full.

Then you add to movieclip to the printjob and push the reference to the
movieclip to an array.

Cut the remaining text and fill up the next one...
Create a loop of this to write out all your text.

After all text is written out, you execute the printjob and remove all
the movieclips with removeMovieClip by looping the array of movieclips.

NOTE : this is easier than it seems.


Been there, done that,

Regards,

Hans.




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of julian
atienza
Sent: maandag 24 april 2006 17:26
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] PRINTJOB HELL, PRINTJOB NIGHTMARE with several
PAGES

Hi.
I wanted to Print contents of a long Scrollable textArea  with Flash, but
it's a kind of nightmare.

I tried to made a class to manage Printing (with a PrintJob object inside)
,
and one empty swf that Creates Dynamically the TextArea and the Class to
ManagePrinting, who feeds textArea with contents and scroll TextArea
adding
page by page contents.

Problems:

- The Scrolled area in Screen doesn't appeared to be the same than the
printable area (each Page, i see repeated contents... why? i just don't
know
. IT's like the scroll doesn't scroll propertly).

- Of course, sometimes, appeared incomplete text (with a cut at the
middle)
because i don't know any mechanism to avoid it at the moment.


Somebody have any idea -> the contents to print will be sometimes of 5 or
6
pages DIN A-4

thanks in advance
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] printJob and printAsBitmap

2006-05-02 Thread Tom Lee
Yuk... I don't envy you.  Been there, done that! ;)

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Éric
Thibault
Sent: Tuesday, May 02, 2006 2:21 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] printJob and printAsBitmap

I had an error with the scope of my mc_print.  The printjob worked OK 
(the printer was printing fine) with both printAsBitmap but with the 
settings to vector instead of bitmap, the function took the parent mc 
(_root) and made it invisible! I've search for about half an hour before 
noticing it!

I'm working with a 1 year old project and I have to patch code and add 
functionalities to a crowded interface and clogged AS...

Tom Lee a écrit :
> Do you still need help with the issue, or did you figure it out?
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Éric
> Thibault
> Sent: Tuesday, May 02, 2006 1:51 PM
> To: Flashcoders mailing list
> Subject: Re: [Flashcoders] printJob and printAsBitmap
>
> Never mind... I think it's going to be a long long week...
>
>   


-- 
===

Éric Thibault
Programmeur analyste
Réseau de valorisation de l'enseignement
Université Laval, pavillon Félix-Antoine Savard
Québec, Canada
Tel.: 656-2131 poste 18015
Courriel : [EMAIL PROTECTED]

===

Avis relatif à la confidentialité / Notice of Confidentiality / Advertencia
de confidencialidad
<http://www.rec.ulaval.ca/lce/securite/confidentialite.htm>

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] printJob and printAsBitmap

2006-05-02 Thread Éric Thibault
I had an error with the scope of my mc_print.  The printjob worked OK 
(the printer was printing fine) with both printAsBitmap but with the 
settings to vector instead of bitmap, the function took the parent mc 
(_root) and made it invisible! I've search for about half an hour before 
noticing it!


I'm working with a 1 year old project and I have to patch code and add 
functionalities to a crowded interface and clogged AS...


Tom Lee a écrit :

Do you still need help with the issue, or did you figure it out?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Éric
Thibault
Sent: Tuesday, May 02, 2006 1:51 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] printJob and printAsBitmap

Never mind... I think it's going to be a long long week...

  



--
===

Éric Thibault
Programmeur analyste
Réseau de valorisation de l'enseignement
Université Laval, pavillon Félix-Antoine Savard
Québec, Canada
Tel.: 656-2131 poste 18015
Courriel : [EMAIL PROTECTED]

===

Avis relatif à la confidentialité / Notice of Confidentiality / Advertencia de 
confidencialidad <http://www.rec.ulaval.ca/lce/securite/confidentialite.htm>

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] printJob and printAsBitmap

2006-05-02 Thread Tom Lee
Do you still need help with the issue, or did you figure it out?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Éric
Thibault
Sent: Tuesday, May 02, 2006 1:51 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] printJob and printAsBitmap

Never mind... I think it's going to be a long long week...

-- 
===

Éric Thibault
Programmeur analyste
Réseau de valorisation de l'enseignement
Université Laval, pavillon Félix-Antoine Savard
Québec, Canada
Tel.: 656-2131 poste 18015
Courriel : [EMAIL PROTECTED]

===

Avis relatif à la confidentialité / Notice of Confidentiality / Advertencia
de confidencialidad
<http://www.rec.ulaval.ca/lce/securite/confidentialite.htm>

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] printJob and printAsBitmap

2006-05-02 Thread Éric Thibault

Never mind... I think it's going to be a long long week...

--
===

Éric Thibault
Programmeur analyste
Réseau de valorisation de l'enseignement
Université Laval, pavillon Félix-Antoine Savard
Québec, Canada
Tel.: 656-2131 poste 18015
Courriel : [EMAIL PROTECTED]

===

Avis relatif à la confidentialité / Notice of Confidentiality / Advertencia de 
confidencialidad 

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] printJob and printAsBitmap

2006-05-02 Thread Éric Thibault


Hi all...

I'm adding a simple "printsomeinfo" page to my project but something 
strange is happening!


The printout will be of pure text with no images so I'm setting the 
printAsBitmap to false... but the content of my SWF (all of it including 
loaded clips) just dissapeares once the print dialog is gone...   If I 
set it to true, everything is OK!?!  My mc_print that I want to print is 
not visible on the stage (x = -1000).


The thing is the printing looks better in vector based than as a bitmap!

I've used printJob a while ago with no problems (I was always printing 
as bitmap because of images).


I'm using Flash 8 but publishing in player 7

MyPrintJob.addPage("mc_print",{xMin:0, xMax:980, yMin:0, 
yMax:1500},{printAsBitmap:false},1);


Thanks!

--
===

Éric Thibault
Programmeur analyste
Réseau de valorisation de l'enseignement
Université Laval, pavillon Félix-Antoine Savard
Québec, Canada
Tel.: 656-2131 poste 18015
Courriel : [EMAIL PROTECTED]

===

Avis relatif à la confidentialité / Notice of Confidentiality / Advertencia de 
confidencialidad 

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] PRINTJOB HELL, PRINTJOB NIGHTMARE with several PAGES

2006-04-24 Thread Van De Velde Hans
You get your text from the textarea and you do this:

Dynamically attach a movieclip from the library with a preformatted
textfield that exactly fits an A4 page (set movieclip to _visible = false to
do it invisibly)
and fill the textfield up with the text from your textarea until the
textfield is full.

Then you add to movieclip to the printjob and push the reference to the
movieclip to an array. 

Cut the remaining text and fill up the next one...
Create a loop of this to write out all your text.

After all text is written out, you execute the printjob and remove all 
the movieclips with removeMovieClip by looping the array of movieclips.

NOTE : this is easier than it seems.


Been there, done that,

Regards,

Hans.




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of julian
atienza
Sent: maandag 24 april 2006 17:26
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] PRINTJOB HELL, PRINTJOB NIGHTMARE with several PAGES

Hi.
I wanted to Print contents of a long Scrollable textArea  with Flash, but
it's a kind of nightmare.

I tried to made a class to manage Printing (with a PrintJob object inside) ,
and one empty swf that Creates Dynamically the TextArea and the Class to
ManagePrinting, who feeds textArea with contents and scroll TextArea adding
page by page contents.

Problems:

- The Scrolled area in Screen doesn't appeared to be the same than the
printable area (each Page, i see repeated contents... why? i just don't know
. IT's like the scroll doesn't scroll propertly).

- Of course, sometimes, appeared incomplete text (with a cut at the middle)
because i don't know any mechanism to avoid it at the moment.


Somebody have any idea -> the contents to print will be sometimes of 5 or 6
pages DIN A-4

thanks in advance
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] PRINTJOB HELL, PRINTJOB NIGHTMARE with several PAGES

2006-04-24 Thread julian atienza
Hi.
I wanted to Print contents of a long Scrollable textArea  with Flash, but
it's a kind of nightmare.

I tried to made a class to manage Printing (with a PrintJob object inside) ,
and one empty swf that Creates Dynamically the TextArea and the Class to
ManagePrinting, who feeds textArea with contents and scroll TextArea adding
page by page contents.

Problems:

- The Scrolled area in Screen doesn't appeared to be the same than the
printable area (each Page, i see repeated contents... why? i just don't know
. IT's like the scroll doesn't scroll propertly).

- Of course, sometimes, appeared incomplete text (with a cut at the middle)
because i don't know any mechanism to avoid it at the moment.


Somebody have any idea -> the contents to print will be sometimes of 5 or 6
pages DIN A-4

thanks in advance
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] PrintJob causes Abort Script error message.

2006-04-03 Thread Tyler Wright
> I have over 20 years of programming experience including at assembler
> level, advanced Java, etc, but thanks for trying to put me in my place :-)


There is no error. There is no timeout. Not in the PrintDialog object.

I think the FlashCoders list in general has a silly habbit of saying
something like:

does mc._xscale = 50 change the width? does anyone know this answer?

and then half a week later, after pages of theoretical discussion, someone
actually tries out the half-minute test.

"Try and do anything advanced (such as a stock exchange trading system) and
it [breaks] ... That ain't an error with my code!"  is a DailyWTF-worthy
comment. What does a stock exchange trading system have to do with the OS
print dialog?

I've never seen this error, in any version of Flash since 7 when it was
created. I've created complex (2-year) systems where the sole product is a
printed page from Flash.

simple test. just a simple test

Tyler
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-30 Thread Ron Wheeler

Let us know how it all works out.
Good luck.

Ron

[EMAIL PROTECTED] wrote:
I agree with your sentiments Ron, that future designers of RIAs authored with Flash need to be aware of this issue. 


To clarify my own situation, I have inherited half-way through development an 
extremely complex system, that has just gone live with several thousand users. 
The system is a joint effort by several organisations. Roll-out has been 
exceptionally smooth. The printing functionality was one of the many late spec 
changes that the client asked for. As the system is composed of many V2-style 
components, many of which use interval timers to get around initialization 
issues, and has a lot of real-time financial data transfer going on in the 
background, setintervals, etc etc, that to reengineer it at this stage is 
totally out of the question.

I believe that it is up to Macromedia to engineer the Flash player and the 
intrinsic classes that we developers can do nothing about, so that they work 
robustly and as expected. They could at least amend the documentaion for 
PrintJob to warn developers of the issues.




 --- On Wed 03/29, Ron Wheeler < [EMAIL PROTECTED] > wrote:
From: Ron Wheeler [mailto: [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Date: Wed, 29 Mar 2006 09:04:19 -0500
Subject: Re: [Flashcoders] PrintJob causes Abort Script error message.
  
 I would suggest setting the timeout to 7200 seconds and then test it to see what happens if you leave it sitting over lunch.Please warn us when you are going to do this, since from the tone of the conversation, there is some sense that this will cause the end of civilization as we know it.I suspect that the impact will be considerably less and the users of the application may be able to deal with any repercussions by changing their reaction to a dialogue box - it should not be taken as an invitation to go for a coffee.If Macromedia feels OK about the single threading issue, we have to cut ourselves some slack about dealing with it.It certainly is a cautionary note to designers of new applications that you should consider designing in some way to easily shutdown all of the animation and communication functions while setting up a print job. The effect on a communication link of an extended timeout might be one of the problems that you encounter since the other end might 
  

decide that you have died over lunch and cut its end. If you are 
re-establishing the link (authorization???) on each data transfer, this may not 
be a problem.RonRon/training.figleaf.com

___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


  


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-30 Thread Steven Sacks
> As the 
> system is composed of many V2-style components, many of which 
> use interval timers to get around initialization issues, and 
> has a lot of real-time financial data transfer going on in 
> the background, setintervals, etc etc, that to reengineer it 
> at this stage is totally out of the question.

Well, it always sucks to inherit somebody else's bad work.  I've done it
many times, and almost always it would have been better to rewrite it myself
(and sometimes I did).

PrintJob has a ton of problems.  It's a terribly written and poorly
documented class.

-Steven

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-30 Thread

I agree with your sentiments Ron, that future designers of RIAs authored with 
Flash need to be aware of this issue. 

To clarify my own situation, I have inherited half-way through development an 
extremely complex system, that has just gone live with several thousand users. 
The system is a joint effort by several organisations. Roll-out has been 
exceptionally smooth. The printing functionality was one of the many late spec 
changes that the client asked for. As the system is composed of many V2-style 
components, many of which use interval timers to get around initialization 
issues, and has a lot of real-time financial data transfer going on in the 
background, setintervals, etc etc, that to reengineer it at this stage is 
totally out of the question.

I believe that it is up to Macromedia to engineer the Flash player and the 
intrinsic classes that we developers can do nothing about, so that they work 
robustly and as expected. They could at least amend the documentaion for 
PrintJob to warn developers of the issues.




 --- On Wed 03/29, Ron Wheeler < [EMAIL PROTECTED] > wrote:
From: Ron Wheeler [mailto: [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Date: Wed, 29 Mar 2006 09:04:19 -0500
Subject: Re: [Flashcoders] PrintJob causes Abort Script error message.
>>  I would suggest setting the timeout to 7200 seconds and then test it to see 
>> what happens if you leave it sitting over lunch.Please warn us when you are 
>> going to do this, since from the tone of the conversation, there is some 
>> sense that this will cause the end of civilization as we know it.I suspect 
>> that the impact will be considerably less and the users of the application 
>> may be able to deal with any repercussions by changing their reaction to a 
>> dialogue box - it should not be taken as an invitation to go for a coffee.If 
>> Macromedia feels OK about the single threading issue, we have to cut 
>> ourselves some slack about dealing with it.It certainly is a cautionary note 
>> to designers of new applications that you should consider designing in some 
>> way to easily shutdown all of the animation and communication functions 
>> while setting up a print job. The effect on a communication link of an 
>> extended timeout might be one of the problems that you encounter since the 
>> other end might 
decide that you have died over lunch and cut its end. If you are 
re-establishing the link (authorization???) on each data transfer, this may not 
be a problem.RonRon/training.figleaf.com

___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread Ron Wheeler



Steven Sacks wrote:
Please warn us when you are going to do this, since from the 
tone of the 
conversation, there is some sense that this will cause the end of 
civilization as we know it.



Hacking the swf to increase the timeout is not the solution, it's a band-aid
on a gunshot wound.

  
Maybe he is only nicked and a band-aid might do the job. It is hard to 
tell without reading all 50,000 lines of his code.


In the real world, sometimes you only need to fix the problem in the 
current release and can fix the design in the next version. Patches are 
allowed and many patches do not make it into the next release because 
the underlying problem goes away with a redesign.
It is impossible to tell if his application will blow up after the 
timeout is increased but it is unlikely that it will cause the rest of 
us much of a problem.


Ron

I have over 20 years of programming experience including at 
assembler level, advanced Java, etc, but thanks for trying to 
put me in my place :-)



Let's say for argument's sake that it is a bug and it is all Macromedia's
fault and they won't fix it and life is unfair.  That doesn't change the
fact that your application needs to work to your client's expectations.  You
need to find a solution because that's what you're paid to do.
  
You hit the nail on the head here - "your application needs to work to 
your client's expectations";  not to ours or not to be perfect.

As Danny Kodicek knows coming from a Director background, there were tons of
bugs in Director and workarounds had to be figured out to make certain
things work.  John Dowdell, in his infinite wisdom, got on Direct-L and
posted that Director had no bugs, that there was just application behavior
that Director developers wished worked differently.

At the end of the day, I don't tell my client "Sorry, it's a bug and I can't
work around it".  I figure out how to get it done, and so should you and
everyone else who does this for a living.  The place I'm trying to put you
in is "Flash Developer".  ;)
  
Noble sentiments but sometimes in the real world you have to tell a 
client "Sorry it is a bug/design artifact in the underlying software and 
I can not fix it or implement a work-around in the budget that you want. 
Furthermore, the cost of fixing it exceeds the value to the organization."
In my work, I can not just charge clients money with no accountability. 
They expect me to make reasonable judgements about the value of my 
activities and not to just spend time because I have an ego-driven need 
to get a "perfect" solution. I need to be able to explain my position 
and to demonstrate how my recommendation is in the client's best 
interest. I do not always know when to quit but not quiting or not 
accepting a "good enough" solution is not a virtue (at least not in the 
eye of the guy paying for it).


Ron
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread Steven Sacks
> Please warn us when you are going to do this, since from the 
> tone of the 
> conversation, there is some sense that this will cause the end of 
> civilization as we know it.

Hacking the swf to increase the timeout is not the solution, it's a band-aid
on a gunshot wound.

> I have over 20 years of programming experience including at 
> assembler level, advanced Java, etc, but thanks for trying to 
> put me in my place :-)

Let's say for argument's sake that it is a bug and it is all Macromedia's
fault and they won't fix it and life is unfair.  That doesn't change the
fact that your application needs to work to your client's expectations.  You
need to find a solution because that's what you're paid to do.

As Danny Kodicek knows coming from a Director background, there were tons of
bugs in Director and workarounds had to be figured out to make certain
things work.  John Dowdell, in his infinite wisdom, got on Direct-L and
posted that Director had no bugs, that there was just application behavior
that Director developers wished worked differently.

At the end of the day, I don't tell my client "Sorry, it's a bug and I can't
work around it".  I figure out how to get it done, and so should you and
everyone else who does this for a living.  The place I'm trying to put you
in is "Flash Developer".  ;)

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] PrintJob

2006-03-29 Thread Mike Mountain
Not tried it but a painless way to get around some printing wierdness
may be to copy the bitmapdat of the thing you want to print out, paste
it into an MC offstage then print that?

M

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of Lee McColl-Sylvester
> Sent: 29 March 2006 14:35
> To: Flashcoders mailing list
> Subject: RE: [Flashcoders] PrintJob
> 
> The Print feature of Flash prints the passed MovieClip... It 
> there is content that the MovieClip isn't showing, then you 
> need to print the inner clip containing the content instead.  
> To find the location of this clip, I suggest using John Gardn's Xray.
> 
> Lee
> 
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread Lee McColl-Sylvester
Wow, I really should break my sentences up with comma's and fullstops.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Lee
McColl-Sylvester
Sent: 29 March 2006 15:22
To: Flashcoders mailing list
Subject: RE: [Flashcoders] PrintJob causes Abort Script error message.

Remember, though, that should an unforeseen cercumstance occur in your
application that will otherwise throw an error will likely hang the
users machine with no typical way for the user to escape except to crash
the application completely... Most users don't like that too much :-P

Lee



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ron
Wheeler
Sent: 29 March 2006 15:04
To: Flashcoders mailing list
Subject: Re: [Flashcoders] PrintJob causes Abort Script error message.



Steven Sacks wrote:
> I have explained in detail the source of your problem.  If you choose
not to
> take the advice given to you by coders who know more than you about
the
> subject at hand, then why post a question to the list?  You are doing
> yourself and your client a disservice with your blame Macromedia
attitude
> and finger pointing.
>
> It's not the end of the world.  Your code simply does not take into
account
> a synchronous call.  That is not PrintJob's fault.  That is not the
Flash
> player's fault.  You should fix your code now that you understand why
it's
> breaking.  The fact is, there's a real solution to your problem.
>
> Whether you realize it or not, you have already admitted that it is
your
> code that is to blame.  You have stated twice now that the application
is a
> real-time trading system.  In all likelihood, this means you have
intervals
> running and all kinds of parsing and drawing going on most of the
time.  The
> exact kind of processes that would go haywire should Flash have to
make a
> synchronous call with an indeterminate response time.
>
> PrintJob makes a synchronous call and Flash is single threaded.  All
your
> real-time stuff is reacting to the synchronous call.  When a user
presses
> the print button, you need to put a halt on new processes, wait for
currrent
> processes to complete and then start the PrintJob.  If it's going to
take
> more than 250ms, throw up a window that says something like "Preparing
to
> print".  Upon completion of the PrintJob, you need to resync with the
server
> immediately, and should probably put up a window that says something
like
> "Sending data to printer" until the application is all caught up.
>
> Your SLI injection to increase the timeout as a solution is
irreponsible.
> It is a heavy-handed technique fraught with potential problems far
worse
> than your printing one and it doesn't actually solve the problem, it
just
> masks it, and poorly.  I wouldn't go live with that.
>
> "Do the right thing." - Spike Lee
>
>
>   
I would suggest setting the timeout to 7200 seconds and then test it to 
see what happens if you leave it sitting over lunch.

Please warn us when you are going to do this, since from the tone of the

conversation, there is some sense that this will cause the end of 
civilization as we know it.

I suspect that the impact will be considerably less and the users of the

application may be able to deal with any repercussions by changing their

reaction to a dialogue box - it should not be taken as an invitation to 
go for a coffee.

If Macromedia feels OK about the single threading issue, we have to cut 
ourselves some slack about dealing with it.

It certainly is a cautionary note to designers of new applications that 
you should consider designing in some way to easily shutdown all of the 
animation and communication functions while setting up a print job. The 
effect on a communication link of an extended timeout might be one of 
the problems that you encounter since the other end might decide that 
you have died over lunch and cut its end. If you are re-establishing the

link (authorization???) on each data transfer, this may not be a
problem.

Ron

Ron

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subs

RE: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread Lee McColl-Sylvester
Remember, though, that should an unforeseen cercumstance occur in your
application that will otherwise throw an error will likely hang the
users machine with no typical way for the user to escape except to crash
the application completely... Most users don't like that too much :-P

Lee



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ron
Wheeler
Sent: 29 March 2006 15:04
To: Flashcoders mailing list
Subject: Re: [Flashcoders] PrintJob causes Abort Script error message.



Steven Sacks wrote:
> I have explained in detail the source of your problem.  If you choose
not to
> take the advice given to you by coders who know more than you about
the
> subject at hand, then why post a question to the list?  You are doing
> yourself and your client a disservice with your blame Macromedia
attitude
> and finger pointing.
>
> It's not the end of the world.  Your code simply does not take into
account
> a synchronous call.  That is not PrintJob's fault.  That is not the
Flash
> player's fault.  You should fix your code now that you understand why
it's
> breaking.  The fact is, there's a real solution to your problem.
>
> Whether you realize it or not, you have already admitted that it is
your
> code that is to blame.  You have stated twice now that the application
is a
> real-time trading system.  In all likelihood, this means you have
intervals
> running and all kinds of parsing and drawing going on most of the
time.  The
> exact kind of processes that would go haywire should Flash have to
make a
> synchronous call with an indeterminate response time.
>
> PrintJob makes a synchronous call and Flash is single threaded.  All
your
> real-time stuff is reacting to the synchronous call.  When a user
presses
> the print button, you need to put a halt on new processes, wait for
currrent
> processes to complete and then start the PrintJob.  If it's going to
take
> more than 250ms, throw up a window that says something like "Preparing
to
> print".  Upon completion of the PrintJob, you need to resync with the
server
> immediately, and should probably put up a window that says something
like
> "Sending data to printer" until the application is all caught up.
>
> Your SLI injection to increase the timeout as a solution is
irreponsible.
> It is a heavy-handed technique fraught with potential problems far
worse
> than your printing one and it doesn't actually solve the problem, it
just
> masks it, and poorly.  I wouldn't go live with that.
>
> "Do the right thing." - Spike Lee
>
>
>   
I would suggest setting the timeout to 7200 seconds and then test it to 
see what happens if you leave it sitting over lunch.

Please warn us when you are going to do this, since from the tone of the

conversation, there is some sense that this will cause the end of 
civilization as we know it.

I suspect that the impact will be considerably less and the users of the

application may be able to deal with any repercussions by changing their

reaction to a dialogue box - it should not be taken as an invitation to 
go for a coffee.

If Macromedia feels OK about the single threading issue, we have to cut 
ourselves some slack about dealing with it.

It certainly is a cautionary note to designers of new applications that 
you should consider designing in some way to easily shutdown all of the 
animation and communication functions while setting up a print job. The 
effect on a communication link of an extended timeout might be one of 
the problems that you encounter since the other end might decide that 
you have died over lunch and cut its end. If you are re-establishing the

link (authorization???) on each data transfer, this may not be a
problem.

Ron

Ron

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread Ron Wheeler



Steven Sacks wrote:

I have explained in detail the source of your problem.  If you choose not to
take the advice given to you by coders who know more than you about the
subject at hand, then why post a question to the list?  You are doing
yourself and your client a disservice with your blame Macromedia attitude
and finger pointing.

It's not the end of the world.  Your code simply does not take into account
a synchronous call.  That is not PrintJob's fault.  That is not the Flash
player's fault.  You should fix your code now that you understand why it's
breaking.  The fact is, there's a real solution to your problem.

Whether you realize it or not, you have already admitted that it is your
code that is to blame.  You have stated twice now that the application is a
real-time trading system.  In all likelihood, this means you have intervals
running and all kinds of parsing and drawing going on most of the time.  The
exact kind of processes that would go haywire should Flash have to make a
synchronous call with an indeterminate response time.

PrintJob makes a synchronous call and Flash is single threaded.  All your
real-time stuff is reacting to the synchronous call.  When a user presses
the print button, you need to put a halt on new processes, wait for currrent
processes to complete and then start the PrintJob.  If it's going to take
more than 250ms, throw up a window that says something like "Preparing to
print".  Upon completion of the PrintJob, you need to resync with the server
immediately, and should probably put up a window that says something like
"Sending data to printer" until the application is all caught up.

Your SLI injection to increase the timeout as a solution is irreponsible.
It is a heavy-handed technique fraught with potential problems far worse
than your printing one and it doesn't actually solve the problem, it just
masks it, and poorly.  I wouldn't go live with that.

"Do the right thing." - Spike Lee


  
I would suggest setting the timeout to 7200 seconds and then test it to 
see what happens if you leave it sitting over lunch.


Please warn us when you are going to do this, since from the tone of the 
conversation, there is some sense that this will cause the end of 
civilization as we know it.


I suspect that the impact will be considerably less and the users of the 
application may be able to deal with any repercussions by changing their 
reaction to a dialogue box - it should not be taken as an invitation to 
go for a coffee.


If Macromedia feels OK about the single threading issue, we have to cut 
ourselves some slack about dealing with it.


It certainly is a cautionary note to designers of new applications that 
you should consider designing in some way to easily shutdown all of the 
animation and communication functions while setting up a print job. The 
effect on a communication link of an extended timeout might be one of 
the problems that you encounter since the other end might decide that 
you have died over lunch and cut its end. If you are re-establishing the 
link (authorization???) on each data transfer, this may not be a problem.


Ron

Ron

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread

I asked for a workaround or a kludge, knowing full well what the issues are. 
Luckily a kind person who knew more than me about the matter in hand suggested 
one.

I have over 20 years of programming experience including at assembler level, 
advanced Java, etc, but thanks for trying to put me in my place :-)


 --- On Wed 03/29, Steven Sacks < [EMAIL PROTECTED] > wrote:
From: Steven Sacks [mailto: [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Date: Wed, 29 Mar 2006 05:03:37 -0800
Subject: RE: [Flashcoders] PrintJob causes Abort Script error message.

I have explained in detail the source of your problem.  If you choose not 
totake the advice given to you by coders who know more than you about 
thesubject at hand, then why post a question to the list?  You are 
doingyourself and your client a disservice with your blame Macromedia 
attitudeand finger pointing.It's not the end of the world.  Your code simply 
does not take into accounta synchronous call.  That is not PrintJob's fault.  
That is not the Flashplayer's fault.  You should fix your code now that you 
understand why it'sbreaking.  The fact is, there's a real solution to your 
problem.Whether you realize it or not, you have already admitted that it is 
yourcode that is to blame.  You have stated twice now that the application is 
areal-time trading system.  In all likelihood, this means you have 
intervalsrunning and all kinds of parsing and drawing going on most of the 
time.  Theexact kind of processes that would go haywire should Flash have to 
make asynchronous call with an 
indeterminate response time.PrintJob makes a synchronous call and Flash is 
single threaded.  All yourreal-time stuff is reacting to the synchronous call.  
When a user pressesthe print button, you need to put a halt on new processes, 
wait for currrentprocesses to complete and then start the PrintJob.  If it's 
going to takemore than 250ms, throw up a window that says something like 
"Preparing toprint".  Upon completion of the PrintJob, you need to resync with 
the serverimmediately, and should probably put up a window that says something 
like"Sending data to printer" until the application is all caught up.Your SLI 
injection to increase the timeout as a solution is irreponsible.It is a 
heavy-handed technique fraught with potential problems far worsethan your 
printing one and it doesn't actually solve the problem, it justmasks it, and 
poorly.  I wouldn't go live with that."Do the right thing." - Spike Lee> 
-Original Message-> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf > Of [EMAIL PROTECTED]> Sent: Wednesday, 
> March 29, 2006 4:40 AM> To: flashcoders@chattyfig.figleaf.com> Subject: Re: 
> [Flashcoders] PrintJob causes Abort Script error message.> > > >> Danny 
> Kodicek...I think I remember you from my Director > days, so long ago.That's 
> me. And I remember that you were a > bit belligerent then too ;)Danny > > > 
> Ahh yes, the old Direct-L days... sigh.> > Update: that hack gets it up to 
> about 1 min 20 before the > alert appears instead of around 20 secs. Not 
> ideal, but what the heck.> > I can't "fix" code which ain't broken. 50,000 
> lines of real > time trading system works perfectly. One call to PrintJob and 
> > it all goes horribly wrong. Its a Flash Player / PrintJob > issue.If 
> Macrobe want Flash to be taken seriously as an RIA > platform issues such as 
> this need to be fixed before > Microsoft gets us all writing C#.> > 
> ___> Join 
Excite! - http://www.excite.com> The most personalized portal on the Web!> > > 
___> 
Flashcoders@chattyfig.figleaf.com> To change your subscription options or 
search the archive:> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders> 
> Brought to you by Fig Leaf Software> Premier Authorized Adobe Consulting and 
Training> http://www.figleaf.com> http://[EMAIL PROTECTED] change your 
subscription options or search the 
archive:http://chattyfig.figleaf.com/mailman/listinfo/flashcodersBrought to you 
by Fig Leaf SoftwarePremier Authorized Adobe Consulting and 
Traininghttp://www.figleaf.comhttp://training.figleaf.com

___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] PrintJob

2006-03-29 Thread Lee McColl-Sylvester
The Print feature of Flash prints the passed MovieClip... It there is
content that the MovieClip isn't showing, then you need to print the
inner clip containing the content instead.  To find the location of this
clip, I suggest using John Gardn's Xray.

Lee



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of julian
atienza
Sent: 29 March 2006 14:23
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] PrintJob

Hi,
I'm in a trouble using PrintJob class... it perhaps could be useful to
print
complete or partial Movieclips but... what's about html contents of a
textarea?

- the bottom part (with scroll) isn't printed with printjob.
- format of text appears horrible (like in screen but with big sizes).
is
there anyway to format it correctly (with line and page breaks...)?

anybody knows any open-source development or component that could helps
me
with this due?

thank you so much.
help will be so appreciated...
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] PrintJob

2006-03-29 Thread julian atienza
Hi,
I'm in a trouble using PrintJob class... it perhaps could be useful to print
complete or partial Movieclips but... what's about html contents of a
textarea?

- the bottom part (with scroll) isn't printed with printjob.
- format of text appears horrible (like in screen but with big sizes). is
there anyway to format it correctly (with line and page breaks...)?

anybody knows any open-source development or component that could helps me
with this due?

thank you so much.
help will be so appreciated...
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread Steven Sacks
> Actually, I don't really get your point here. Because Flash is 
> single-threaded, it doesn't really mean anything to talk 
> about 'scripts in 
> the middle of anything'. There's precisely one script at any 
> one time that's 
> in the middle of anything. The size of the call stack should 
> be neither here 
> nor there when Flash is deciding if it's hanging.

If I wanted to, I could write a simple movie that causes a timeout popup to
appear 15 seconds after I start a PrintJob.  It doesn't need to be a
complicated stock trading application to cause the behavior Grime is
experiencing, and therefore it's a solvable problem.

Bottom line here is this:

"Is this a known Flash bug?"
It's a known Flash limitation.

"Is there a workaround?"
Yes.  But apparently, he's not interested in doing it.

I call it as I see it and it's lazy and irresponsible to claim you're not
going to fix something because you think your host app should work
differently than it does.  If you don't like working within the confines of
Flash being single-threaded and PrintJob being a synchronous call to the
system, then learn C++ and free yourself.  Otherwise, step up and do the job
you're paid to do - Flash development.  I mean, c'mon.  It's ok to whine
about stuff like this, but at the end of the day you need to make it work
because that's what your client is paying you to do.

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread Lee McColl-Sylvester
That's what I think...  The Print Dialog is modal, so Flash should shut
up and wait, not run ahead of itself doing all other manners of things
(excuse the grammer)!

Lee



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Danny
Kodicek
Sent: 29 March 2006 14:08
To: Flashcoders mailing list
Subject: Re: [Flashcoders] PrintJob causes Abort Script error message.

> The PrintJob class has no idea if other scripts are in the middle of
> something when it makes its synchronous call to the system, nor should
it.
> PrintJob can't make sure that there are no other scripts in the middle
of
> anything when it tells the browser to open a print dialog.  It does
what
> it's told to do.  It's up to the coder to make sure there isn't code
that
> would be adversely affected by Flash making a synchronous call.

Actually, I don't really get your point here. Because Flash is 
single-threaded, it doesn't really mean anything to talk about 'scripts
in 
the middle of anything'. There's precisely one script at any one time
that's 
in the middle of anything. The size of the call stack should be neither
here 
nor there when Flash is deciding if it's hanging.

Danny 

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread Lee McColl-Sylvester
I get the feeling Director may eventually get phased out.  I used to use
it extensively too.  Back when I was building Flash sites in version 4,
if you wanted to use Flash for anything other than that, the usual route
was to just drop it in Director and use getUrl("lingo:") to handle the
transfers... Cha, like people would accept developing like that now
;)... Plus, that darn stupid AS1 coding window!  Having to code by
clicking on a list of about 10 commands was not fun :-D

Anyway, now Flash is all powerful, who needs Director?  If I want to do
something Flash can't, well... That's what apps like Zinc are for.

Lee


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Danny
Kodicek
Sent: 29 March 2006 14:07
To: Flashcoders mailing list
Subject: Re: [Flashcoders] PrintJob causes Abort Script error message.


>> > Danny Kodicek...I think I remember you from my Director
>> days, so long ago.
>>
>> That's me. And I remember that you were a bit belligerent then too ;)
>
> You finally gave up on Director, huh?

Not at all, it's my bread and butter and I'm using it constantly. But I
use 
Flash at the same time

IIRC, which I may not, you were among
> the many ostriches in the Director community back when Flash was in
its
> infancy (pre F5).  ;)

Not that I recall - I've been using both for quite some time, but I do 
prefer Director on the whole. I just get frustrated that Director
doesn't 
get the MM support that Flash does.

>
> If you think I'm belligerent, I have one word for you.  Howdyman.
Nuff
> said.

:)

Danny 

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread Danny Kodicek

The PrintJob class has no idea if other scripts are in the middle of
something when it makes its synchronous call to the system, nor should it.
PrintJob can't make sure that there are no other scripts in the middle of
anything when it tells the browser to open a print dialog.  It does what
it's told to do.  It's up to the coder to make sure there isn't code that
would be adversely affected by Flash making a synchronous call.


Actually, I don't really get your point here. Because Flash is 
single-threaded, it doesn't really mean anything to talk about 'scripts in 
the middle of anything'. There's precisely one script at any one time that's 
in the middle of anything. The size of the call stack should be neither here 
nor there when Flash is deciding if it's hanging.


Danny 


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread Danny Kodicek



> Danny Kodicek...I think I remember you from my Director
days, so long ago.

That's me. And I remember that you were a bit belligerent then too ;)


You finally gave up on Director, huh?


Not at all, it's my bread and butter and I'm using it constantly. But I use 
Flash at the same time


IIRC, which I may not, you were among

the many ostriches in the Director community back when Flash was in its
infancy (pre F5).  ;)


Not that I recall - I've been using both for quite some time, but I do 
prefer Director on the whole. I just get frustrated that Director doesn't 
get the MM support that Flash does.




If you think I'm belligerent, I have one word for you.  Howdyman.  Nuff
said.


:)

Danny 


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread Steven Sacks
I have explained in detail the source of your problem.  If you choose not to
take the advice given to you by coders who know more than you about the
subject at hand, then why post a question to the list?  You are doing
yourself and your client a disservice with your blame Macromedia attitude
and finger pointing.

It's not the end of the world.  Your code simply does not take into account
a synchronous call.  That is not PrintJob's fault.  That is not the Flash
player's fault.  You should fix your code now that you understand why it's
breaking.  The fact is, there's a real solution to your problem.

Whether you realize it or not, you have already admitted that it is your
code that is to blame.  You have stated twice now that the application is a
real-time trading system.  In all likelihood, this means you have intervals
running and all kinds of parsing and drawing going on most of the time.  The
exact kind of processes that would go haywire should Flash have to make a
synchronous call with an indeterminate response time.

PrintJob makes a synchronous call and Flash is single threaded.  All your
real-time stuff is reacting to the synchronous call.  When a user presses
the print button, you need to put a halt on new processes, wait for currrent
processes to complete and then start the PrintJob.  If it's going to take
more than 250ms, throw up a window that says something like "Preparing to
print".  Upon completion of the PrintJob, you need to resync with the server
immediately, and should probably put up a window that says something like
"Sending data to printer" until the application is all caught up.

Your SLI injection to increase the timeout as a solution is irreponsible.
It is a heavy-handed technique fraught with potential problems far worse
than your printing one and it doesn't actually solve the problem, it just
masks it, and poorly.  I wouldn't go live with that.

"Do the right thing." - Spike Lee





> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of [EMAIL PROTECTED]
> Sent: Wednesday, March 29, 2006 4:40 AM
> To: flashcoders@chattyfig.figleaf.com
> Subject: Re: [Flashcoders] PrintJob causes Abort Script error message.
> 
> 
> >> Danny Kodicek...I think I remember you from my Director 
> days, so long ago.That's me. And I remember that you were a 
> bit belligerent then too ;)Danny 
> 
> 
> Ahh yes, the old Direct-L days... sigh.
> 
> Update: that hack gets it up to about 1 min 20 before the 
> alert appears instead of around 20 secs. Not ideal, but what the heck.
> 
> I can't "fix" code which ain't broken. 50,000 lines of real 
> time trading system works perfectly. One call to PrintJob and 
> it all goes horribly wrong. Its a Flash Player / PrintJob 
> issue.If Macrobe want Flash to be taken seriously as an RIA 
> platform issues such as this need to be fixed before 
> Microsoft gets us all writing C#.
> 
> ___
> Join Excite! - http://www.excite.com
> The most personalized portal on the Web!
> 
> 
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> 
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread Lee McColl-Sylvester
I noticed a cool little feature in Flash recently that could apply to
this.  I found that if you load an SWF into a MovieClip that the SWF
will take on a lot of the properties of the parent SWF (as we all know),
but, by loading the SWF into a different level, it maintains its own.
Perhaps if you create a separate SWF for handling the PrintJob and load
that into a new level, thus maintaining a connection to the main SWF, it
might run asynchronous to the main movie.

It's worth a shot and whether it works or not, I get to find out a bit
more about how the levelling in Flash actually works ;-)

Lee




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steven
Sacks
Sent: 29 March 2006 13:19
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] PrintJob causes Abort Script error message.

> PrintJob works fine in simplistic Flash movies.
> That ain't an error with my code!

One of the primary rules of debugging:

If you've got some code that isn't working correctly, make a simple test
in
a new movie.  If it works in the simple test, the issue is somewhere
else
and you need to keep debugging.

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread Steven Sacks
> > Danny Kodicek...I think I remember you from my Director 
> days, so long ago.
> 
> That's me. And I remember that you were a bit belligerent then too ;)

You finally gave up on Director, huh?  IIRC, which I may not, you were among
the many ostriches in the Director community back when Flash was in its
infancy (pre F5).  ;)

If you think I'm belligerent, I have one word for you.  Howdyman.  Nuff
said.

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread

>> Danny Kodicek...I think I remember you from my Director days, so long 
>> ago.That's me. And I remember that you were a bit belligerent then too 
>> ;)Danny 


Ahh yes, the old Direct-L days... sigh.

Update: that hack gets it up to about 1 min 20 before the alert appears instead 
of around 20 secs. Not ideal, but what the heck.

I can't "fix" code which ain't broken. 50,000 lines of real time trading system 
works perfectly. One call to PrintJob and it all goes horribly wrong. Its a 
Flash Player / PrintJob issue.If Macrobe want Flash to be taken seriously as an 
RIA platform issues such as this need to be fixed before Microsoft gets us all 
writing C#.

___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread Steven Sacks
> your discovery that this doesn't occur in a 
> barebones movie 

Actually, it's not a barebones movie.  It's a live web app I wrote awhile
back.  I didn't remember if I ever took more than 15 seconds to finalize a
PrintJob when I tested it so I got worried and went to look and sure enough
no error.

All the discussion about whether it's a bug or not is sort of moot at this
point.  PrintJob handles the dialog just fine.  Technically, it's still not
a bug with PrintJob or Flash and here's why.

The PrintJob class has no idea if other scripts are in the middle of
something when it makes its synchronous call to the system, nor should it.
PrintJob can't make sure that there are no other scripts in the middle of
anything when it tells the browser to open a print dialog.  It does what
it's told to do.  It's up to the coder to make sure there isn't code that
would be adversely affected by Flash making a synchronous call.  It's not
PrintJob's fault, nor is it Flash's fault.  The Flash player is single
threaded.  Period.  You can't say that it's buggy because it's single
threaded.  That is its nature.  You have to work within the confines of your
environment.  If you want Flash to be multi-threaded, get in line, but don't
expect it to happen anytime soon (on a side note, I have some friends who
tried to write a wrapper to make Flash run multi-threaded as an experiment
(because you technically had to hack the player which is against MM's EULA)
and it caused all kinds of craziness).

The issue here is that Grime didn't understand how PrintJob worked
(synchronous call) and how a synchronous call affects code running in Flash.
Now that he does, he can write code to stop his code from executing prior to
starting a PrintJob.

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread Steven Sacks
> PrintJob works fine in simplistic Flash movies.
> That ain't an error with my code!

One of the primary rules of debugging:

If you've got some code that isn't working correctly, make a simple test in
a new movie.  If it works in the simple test, the issue is somewhere else
and you need to keep debugging.

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread Steven Sacks
Danny,

Well, I was theorizing but as it turns out, PrintJob does not cause the
Flash player to hang.  It apparently does handle it just fine.  The issue is
definitely with some other code that Grime has running and the fact that
PrintJob causes a sychronous call to be made.

Therefore, the bug is in Grime's code, not PrintJob.

-Steven
 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of Danny Kodicek
> Sent: Wednesday, March 29, 2006 4:10 AM
> To: Flashcoders mailing list
> Subject: Re: [Flashcoders] PrintJob causes Abort Script error message.
> 
> 
> > And for the record, I am certainly no friend of the 
> PrintJob class.  It's
> > poorly written and I've pointed out its numerous flaws in 
> previous posts 
> > to
> > this list.
> >
> > Yes, it shouldn't have been coded to work the way it does.  
> The way it 
> > works
> > is poorly thought out.  But, that doesn't mean that it's a 
> bug because it
> > technically is working exactly as it should.
> 
> I think we're in a semantic discussion about what is and 
> isn't a bug here. I 
> agree with Steve W: I can't see that the Flash engineers would have 
> specifically designed it with this behaviour in mind, and the 
> behaviour is 
> not what the function ought to do from a user's perspective, 
> therefore it's 
> a bug. (Otherwise you could argue that *every* program is 
> doing exactly what 
> it was programmed to do, therefore nothing is a bug).
> 
> I would argue that Flash's 'is it hanging' test should be 
> given a hook that 
> the printJob (or other) classes could talk to, which 
> essentially stops it 
> checking until the function is returned. Anyway, I was under 
> the impression 
> that it counted number of lines of code executed, not time taken. In 
> particular, your discovery that this doesn't occur in a 
> barebones movie 
> would seem to imply that it *is* a bug, because somehow the 
> synchronicity 
> isn't being maintained.
> 
> >
> > Danny Kodicek...I think I remember you from my Director 
> days, so long ago.
> 
> That's me. And I remember that you were a bit belligerent then too ;)
> 
> Danny 
> 
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> 
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread Danny Kodicek



And for the record, I am certainly no friend of the PrintJob class.  It's
poorly written and I've pointed out its numerous flaws in previous posts 
to

this list.

Yes, it shouldn't have been coded to work the way it does.  The way it 
works

is poorly thought out.  But, that doesn't mean that it's a bug because it
technically is working exactly as it should.


I think we're in a semantic discussion about what is and isn't a bug here. I 
agree with Steve W: I can't see that the Flash engineers would have 
specifically designed it with this behaviour in mind, and the behaviour is 
not what the function ought to do from a user's perspective, therefore it's 
a bug. (Otherwise you could argue that *every* program is doing exactly what 
it was programmed to do, therefore nothing is a bug).


I would argue that Flash's 'is it hanging' test should be given a hook that 
the printJob (or other) classes could talk to, which essentially stops it 
checking until the function is returned. Anyway, I was under the impression 
that it counted number of lines of code executed, not time taken. In 
particular, your discovery that this doesn't occur in a barebones movie 
would seem to imply that it *is* a bug, because somehow the synchronicity 
isn't being maintained.




Danny Kodicek...I think I remember you from my Director days, so long ago.


That's me. And I remember that you were a bit belligerent then too ;)

Danny 


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread Steven Sacks
> PrintJob works fine in simplistic Flash movies.
> 
> Try and do anything advanced (such as a stock exchange 
> trading system) and it will cause the alert to appear. 
> 
> That ain't an error with my code!

Ah ha!  So now we get to the bottom of it.

PrintJob does not cause Flash to alert about a slow running script.  We've
established that.  You can't say it's PrintJob's fault anymore just because
your app is more complicated.  If it works in a simple test, it works
period.  The issue lies somewhere else.

Without looking at your code, my best guess is that you are running
processes at the same time as a PrintJob starts.  What's happening is that
you have some script expecting a method to finish running, but the PrintJob
starts and, because it's a synchronous call, Flash sits and waits.
Unfortunately, you've got some other code trying to run or code that was in
the middle of something and because it got locked up while Flash waits on
the PrintJob to complete, it thinks Flash is locked up and Flash throws the
error.

So, yes, it is a problem with your code.  You need to halt all processes
before your PrintJob starts.  Do not use the SLI injector to increase the
timeout.  That's like injecting painkillers in a broken ankle so you can
keep running.  Fix your code.

-Steven

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread Steven Sacks
And for the record, I am certainly no friend of the PrintJob class.  It's
poorly written and I've pointed out its numerous flaws in previous posts to
this list.

Yes, it shouldn't have been coded to work the way it does.  The way it works
is poorly thought out.  But, that doesn't mean that it's a bug because it
technically is working exactly as it should.

Danny Kodicek...I think I remember you from my Director days, so long ago. 

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread

Fab, thanks, I'll give it a try.


 --- On Wed 03/29, =?iso-8859-1?Q?Andr=E9_Goliath?= < [EMAIL PROTECTED] > wrote:
From: =?iso-8859-1?Q?Andr=E9_Goliath?= [mailto: [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Date: Wed, 29 Mar 2006 13:28:18 +0200
Subject: RE: [Flashcoders] PrintJob causes Abort Script error message.

No need to use flasm here, the SLI Injector will do the same since it´snothing 
more than a Tagin the SWF F

___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread

PrintJob works fine in simplistic Flash movies.

Try and do anything advanced (such as a stock exchange trading system) and it 
will cause the alert to appear. 

That ain't an error with my code!


 --- On Wed 03/29, Steven Sacks < [EMAIL PROTECTED] > wrote:
From: Steven Sacks [mailto: [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Date: Wed, 29 Mar 2006 03:34:35 -0800
Subject: RE: [Flashcoders] PrintJob causes Abort Script error message.

The modal dialog does not belong to Flash, it belongs to Windows, 
andspecifically it belongs to the browser window that contains the Flash 
movie.This being said, I have a Flash app that uses PrintJob and I just 
testedkeeping my PrintJob dialog open for a full 3 minutes and I did not get 
analert that Flash was hung.So, it looks like you have some other issue with 
your movie and PrintJobisn't to blame.-Steven> -Original Message-> 
From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf > Of Danny 
Kodicek> Sent: Wednesday, March 29, 2006 3:26 AM> To: Flashcoders mailing list> 
Subject: Re: [Flashcoders] PrintJob causes Abort Script error message.> > > >> 
I would suggest that it is: there's no error in the code, and> >> it's not 
that> >> the Flash movie itself is running slowly, it's purely a> >> result of 
user> >> interaction. While the print dialogue is displayed, the Flash> >> 
movie should> >> simply not be running.> 
>> > PrintJob makes a synchronous call to the OS.  Flash ceases > to execute 
>> > code> > until it receives a response.  Unfortunately, this means > Flash 
>> > is hung on > > a> > line of code which means Flash is going to throw up an 
>> > > error after 15> > seconds because it believes, and rightfully so, that 
>> > it has > code that is> > unresponsive.> >> > It is not a bug.  It's the 
>> > way PrintJob is written - synchronously.> > Er - and I'd say that's a bug 
>> > (in Flash, not in the OP's > code). The code > that checks if a movie is 
>> > hanging should be looking at number > of lines of > code executed. While a 
>> > modal dialogue is up, it shouldn't be > being called at > all.> > Danny > 
>> > > ___> 
>> > Flashcoders@chattyfig.figleaf.com> To change your subscription options or 
>> > search the archive:> 
>> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders> > Brought to 
>> > you by Fig Leaf Software> Premier Authorized Adobe Consulting and 
>> > Training> http://www.figleaf.com> 
http://[EMAIL PROTECTED] change your subscription options or search the 
archive:http://chattyfig.figleaf.com/mailman/listinfo/flashcodersBrought to you 
by Fig Leaf SoftwarePremier Authorized Adobe Consulting and 
Traininghttp://www.figleaf.comhttp://training.figleaf.com

___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread Steven Sacks
> Er - and I'd say that's a bug (in Flash, not in the OP's 
> code). The code 
> that checks if a movie is hanging should be looking at number 
> of lines of 
> code executed. While a modal dialogue is up, it shouldn't be 
> being called at 
> all.

Unfortunately, that's not how it works.  Flash doesn't know why it's hung
and can't know why it's hung on a synchronous call to the system.  Flash
doesn't know that a modal dialog was opened.  All Flash knows is it is
waiting for the method it called to return a value.  As far as Flash is
concerned, the reason it isn't getting a response is that the code that is
processing the return value is running too slowly.  Again, this is due to
the nature of synchronous vs asychronous calls.  A bit of research on the
web should yield some useful information on this topic.

Again, it is not a bug because it works exactly how it is coded to work.

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread Steven Sacks
The modal dialog does not belong to Flash, it belongs to Windows, and
specifically it belongs to the browser window that contains the Flash movie.

This being said, I have a Flash app that uses PrintJob and I just tested
keeping my PrintJob dialog open for a full 3 minutes and I did not get an
alert that Flash was hung.

So, it looks like you have some other issue with your movie and PrintJob
isn't to blame.

-Steven



> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of Danny Kodicek
> Sent: Wednesday, March 29, 2006 3:26 AM
> To: Flashcoders mailing list
> Subject: Re: [Flashcoders] PrintJob causes Abort Script error message.
> 
> 
> >> I would suggest that it is: there's no error in the code, and
> >> it's not that
> >> the Flash movie itself is running slowly, it's purely a
> >> result of user
> >> interaction. While the print dialogue is displayed, the Flash
> >> movie should
> >> simply not be running.
> >
> > PrintJob makes a synchronous call to the OS.  Flash ceases 
> to execute code
> > until it receives a response.  Unfortunately, this means 
> Flash is hung on 
> > a
> > line of code which means Flash is going to throw up an 
> error after 15
> > seconds because it believes, and rightfully so, that it has 
> code that is
> > unresponsive.
> >
> > It is not a bug.  It's the way PrintJob is written - synchronously.
> 
> Er - and I'd say that's a bug (in Flash, not in the OP's 
> code). The code 
> that checks if a movie is hanging should be looking at number 
> of lines of 
> code executed. While a modal dialogue is up, it shouldn't be 
> being called at 
> all.
> 
> Danny 
> 
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> 
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread Lee McColl-Sylvester
Either way, the fact is theres not much to be done... And no Flash
Player update will help, because most users will still have the buggy
version.

Lee



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Danny
Kodicek
Sent: 29 March 2006 12:26
To: Flashcoders mailing list
Subject: Re: [Flashcoders] PrintJob causes Abort Script error message.


>> I would suggest that it is: there's no error in the code, and
>> it's not that
>> the Flash movie itself is running slowly, it's purely a
>> result of user
>> interaction. While the print dialogue is displayed, the Flash
>> movie should
>> simply not be running.
>
> PrintJob makes a synchronous call to the OS.  Flash ceases to execute
code
> until it receives a response.  Unfortunately, this means Flash is hung
on 
> a
> line of code which means Flash is going to throw up an error after 15
> seconds because it believes, and rightfully so, that it has code that
is
> unresponsive.
>
> It is not a bug.  It's the way PrintJob is written - synchronously.

Er - and I'd say that's a bug (in Flash, not in the OP's code). The code

that checks if a movie is hanging should be looking at number of lines
of 
code executed. While a modal dialogue is up, it shouldn't be being
called at 
all.

Danny 

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread André Goliath
No need to use flasm here, the SLI Injector will do the same since it´s
nothing more than a Tag
in the SWF File.

http://www.buraks.com/swfsli/

hth 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steven Sacks
Sent: Wednesday, March 29, 2006 1:05 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] PrintJob causes Abort Script error message.

Well, there IS a workaround but you have to hack your swf using flasm and
set the timeout to some larger number.  This really is not recommended and
most people use this to actually decrease the timeout delay, not increase it
(because they're simultaneously increasing the recursion depth).

http://codeazur.com/forum/viewtopic.php?t=260

http://www.actionscript.org/forums/showthread.php3?t=65371

http://www.powersdk.com/ted/2005/11/macromedia-please-add.php



 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of Steven Sacks
> Sent: Wednesday, March 29, 2006 2:58 AM
> To: 'Flashcoders mailing list'
> Subject: RE: [Flashcoders] PrintJob causes Abort Script error message.
> 
> PrintJob is a poorly written class in general.  Also, it runs 
> synchronously
> when it talks to the system.  The reason Flash throws up the alert is
> because for 15 seconds it is stuck waiting.  The movie is 
> waiting on a line
> of code to finish.  Flash responds to the movie being hung, which it
> technically is because the request to the OS is synchronous.
> 
> There isn't a workaround except to not use PrintJob.
> 
> 
> 
> 
> 
> > -Original Message-
> > From: [EMAIL PROTECTED] 
> > [mailto:[EMAIL PROTECTED] On Behalf 
> > Of [EMAIL PROTECTED]
> > Sent: Wednesday, March 29, 2006 2:38 AM
> > To: flashcoders@chattyfig.figleaf.com
> > Subject: [Flashcoders] PrintJob causes Abort Script error message.
> > 
> > 
> > Apologies for reposting, hopefully someone has come across 
> > this before.
> > 
> > We have a large and complex Flash RIA that represents almost 
> > 2 years of development effort. Unfortunately we have one 
> > major unresolved issue. In a couple of places we have print 
> > functionality. When the print job system dialogue appears, if 
> > the user doesn't close the dialogue within 15 seconds, the 
> > Abort Script message appears ("A script in this movie is 
> > causing Macromedia Flash 8 to run slowly. If it continues to 
> > run, your computer may become unresponsive. Do you want to 
> > abort the script?").
> > 
> > Is this a known Flash bug?
> > Is there a workaround? 
> > We've been trying to solve it for about a month.
> > 
> > ta.
> > 
> > ___
> > Join Excite! - http://www.excite.com
> > The most personalized portal on the Web!
> > 
> > 
> > ___
> > Flashcoders@chattyfig.figleaf.com
> > To change your subscription options or search the archive:
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > 
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com
> > http://training.figleaf.com
> 
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> 
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread Danny Kodicek



I would suggest that it is: there's no error in the code, and
it's not that
the Flash movie itself is running slowly, it's purely a
result of user
interaction. While the print dialogue is displayed, the Flash
movie should
simply not be running.


PrintJob makes a synchronous call to the OS.  Flash ceases to execute code
until it receives a response.  Unfortunately, this means Flash is hung on 
a

line of code which means Flash is going to throw up an error after 15
seconds because it believes, and rightfully so, that it has code that is
unresponsive.

It is not a bug.  It's the way PrintJob is written - synchronously.


Er - and I'd say that's a bug (in Flash, not in the OP's code). The code 
that checks if a movie is hanging should be looking at number of lines of 
code executed. While a modal dialogue is up, it shouldn't be being called at 
all.


Danny 


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread Steve Webster


On 29 Mar 2006, at 12:07, Steven Sacks wrote:


I would suggest that it is: there's no error in the code, and
it's not that
the Flash movie itself is running slowly, it's purely a
result of user
interaction. While the print dialogue is displayed, the Flash
movie should
simply not be running.


PrintJob makes a synchronous call to the OS.  Flash ceases to  
execute code
until it receives a response.  Unfortunately, this means Flash is  
hung on a

line of code which means Flash is going to throw up an error after 15
seconds because it believes, and rightfully so, that it has code  
that is

unresponsive.

It is not a bug.  It's the way PrintJob is written - synchronously.


No, it really is a bug. The bug is that the Flash Player doesn't  
suppress the timeout notification when a PrintJob is active. It is  
quite reasonable to expect a user to spend more than 15 seconds  
configuring their print settings. Since I very much doubt that this  
was intended behaviour, I would class this as a bug.


--
Steve Webster
Head of Development

Featurecreep Ltd.
http://www.featurecreep.com
14 Orchard Street, Bristol, BS1 5EH
0117 905 5047


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread Steven Sacks
> I would suggest that it is: there's no error in the code, and 
> it's not that 
> the Flash movie itself is running slowly, it's purely a 
> result of user 
> interaction. While the print dialogue is displayed, the Flash 
> movie should 
> simply not be running.

PrintJob makes a synchronous call to the OS.  Flash ceases to execute code
until it receives a response.  Unfortunately, this means Flash is hung on a
line of code which means Flash is going to throw up an error after 15
seconds because it believes, and rightfully so, that it has code that is
unresponsive.

It is not a bug.  It's the way PrintJob is written - synchronously.

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread Lee McColl-Sylvester
It's not a bug, its poor programming by Macromedia... Fact is, the Flash
Player should put the PrintJob process into a separate thread, but it
doesn't... My guess is that Macromedia doesn't want to use any more than
a single thread in a single Flash Player instance ;-)

Lee



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Danny
Kodicek
Sent: 29 March 2006 12:03
To: Flashcoders mailing list
Subject: Re: [Flashcoders] PrintJob causes Abort Script error message.

Steven's response was a little unhelpful :)

>> Is this a known Flash bug?
>
> It's not a bug.

I would suggest that it is: there's no error in the code, and it's not
that 
the Flash movie itself is running slowly, it's purely a result of user 
interaction. While the print dialogue is displayed, the Flash movie
should 
simply not be running.

Danny 

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread Steven Sacks
Well, there IS a workaround but you have to hack your swf using flasm and
set the timeout to some larger number.  This really is not recommended and
most people use this to actually decrease the timeout delay, not increase it
(because they're simultaneously increasing the recursion depth).

http://codeazur.com/forum/viewtopic.php?t=260

http://www.actionscript.org/forums/showthread.php3?t=65371

http://www.powersdk.com/ted/2005/11/macromedia-please-add.php



 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of Steven Sacks
> Sent: Wednesday, March 29, 2006 2:58 AM
> To: 'Flashcoders mailing list'
> Subject: RE: [Flashcoders] PrintJob causes Abort Script error message.
> 
> PrintJob is a poorly written class in general.  Also, it runs 
> synchronously
> when it talks to the system.  The reason Flash throws up the alert is
> because for 15 seconds it is stuck waiting.  The movie is 
> waiting on a line
> of code to finish.  Flash responds to the movie being hung, which it
> technically is because the request to the OS is synchronous.
> 
> There isn't a workaround except to not use PrintJob.
> 
> 
> 
> 
> 
> > -Original Message-
> > From: [EMAIL PROTECTED] 
> > [mailto:[EMAIL PROTECTED] On Behalf 
> > Of [EMAIL PROTECTED]
> > Sent: Wednesday, March 29, 2006 2:38 AM
> > To: flashcoders@chattyfig.figleaf.com
> > Subject: [Flashcoders] PrintJob causes Abort Script error message.
> > 
> > 
> > Apologies for reposting, hopefully someone has come across 
> > this before.
> > 
> > We have a large and complex Flash RIA that represents almost 
> > 2 years of development effort. Unfortunately we have one 
> > major unresolved issue. In a couple of places we have print 
> > functionality. When the print job system dialogue appears, if 
> > the user doesn't close the dialogue within 15 seconds, the 
> > Abort Script message appears ("A script in this movie is 
> > causing Macromedia Flash 8 to run slowly. If it continues to 
> > run, your computer may become unresponsive. Do you want to 
> > abort the script?").
> > 
> > Is this a known Flash bug?
> > Is there a workaround? 
> > We've been trying to solve it for about a month.
> > 
> > ta.
> > 
> > ___
> > Join Excite! - http://www.excite.com
> > The most personalized portal on the Web!
> > 
> > 
> > ___
> > Flashcoders@chattyfig.figleaf.com
> > To change your subscription options or search the archive:
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > 
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com
> > http://training.figleaf.com
> 
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> 
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread Danny Kodicek

Steven's response was a little unhelpful :)


Is this a known Flash bug?


It's not a bug.


I would suggest that it is: there's no error in the code, and it's not that 
the Flash movie itself is running slowly, it's purely a result of user 
interaction. While the print dialogue is displayed, the Flash movie should 
simply not be running.


Danny 


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread Steven Sacks
PrintJob is a poorly written class in general.  Also, it runs synchronously
when it talks to the system.  The reason Flash throws up the alert is
because for 15 seconds it is stuck waiting.  The movie is waiting on a line
of code to finish.  Flash responds to the movie being hung, which it
technically is because the request to the OS is synchronous.

There isn't a workaround except to not use PrintJob.





> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of [EMAIL PROTECTED]
> Sent: Wednesday, March 29, 2006 2:38 AM
> To: flashcoders@chattyfig.figleaf.com
> Subject: [Flashcoders] PrintJob causes Abort Script error message.
> 
> 
> Apologies for reposting, hopefully someone has come across 
> this before.
> 
> We have a large and complex Flash RIA that represents almost 
> 2 years of development effort. Unfortunately we have one 
> major unresolved issue. In a couple of places we have print 
> functionality. When the print job system dialogue appears, if 
> the user doesn't close the dialogue within 15 seconds, the 
> Abort Script message appears ("A script in this movie is 
> causing Macromedia Flash 8 to run slowly. If it continues to 
> run, your computer may become unresponsive. Do you want to 
> abort the script?").
> 
> Is this a known Flash bug?
> Is there a workaround? 
> We've been trying to solve it for about a month.
> 
> ta.
> 
> ___
> Join Excite! - http://www.excite.com
> The most personalized portal on the Web!
> 
> 
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> 
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread Steven Sacks
> Is this a known Flash bug?

It's not a bug.


> Is there a workaround? 

You cannot change the timeout.


> We've been trying to solve it for about a month.

A 5 second google search would have saved you 30 days of wasted time.

http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_15512

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] PrintJob causes Abort Script error message.

2006-03-29 Thread

Apologies for reposting, hopefully someone has come across this before.

We have a large and complex Flash RIA that represents almost 2 years of 
development effort. Unfortunately we have one major unresolved issue. In a 
couple of places we have print functionality. When the print job system 
dialogue appears, if the user doesn't close the dialogue within 15 seconds, the 
Abort Script message appears ("A script in this movie is causing Macromedia 
Flash 8 to run slowly. If it continues to run, your computer may become 
unresponsive. Do you want to abort the script?").

Is this a known Flash bug?
Is there a workaround? 
We've been trying to solve it for about a month.

ta.

___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] PrintJob causes Abort Script message to appear

2006-03-21 Thread

I'm working on a complex Flash online application. Its all done in code and 
components, consisting of over 200 classes and probably around 50,000 lines of 
code. 

Unfortunately we have one unresolved issue. In a couple of places we have print 
functionality. When the print job system dialogue appears, the Flash player 
seems to treat it as a loop - after the usual 15 seconds, cascading Abort 
Script messages appear across the screen ("A script in this movie is causing 
Macromedia Flash 8 to run slowly. If it continues to run, your computer may 
become unresponsive. Do you want to abort the script?"). 
I have tried putting a simple print button on the stage, which calls the 
example code from Flash Help to test printing in isolation from the rest of the 
application, but the problem still occurs.

My question is... is there any undocumented way of temporarily disabling the 
Script running slowly alert? Or any other workaround? Our application is going 
to look seriously unprofessional if we can't find a way out. I've double-posted 
this plea on a Macromedia forum, hope noone takes offence.

Thanks.

___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] printJob movieclip positioning

2006-01-20 Thread Yves Peckstadt
Ok , masking it is then.

Thanks for the help guys.

Yves

2006/1/20, Steve Webster <[EMAIL PROTECTED]>:
>
> Hi Yves,
>
> > I'm currently making an application in flash that needs to print
> > any mc that
> > you throw at it in a decent and structured way.
> >
> > This is of course possible with the printJob class but I'm
> > encountering some
> > positioning problems at the moment.
> >
> > Scenario:
> >
> > I have a very big mc (in height) and I want to print it. I decide
> > to cut the
> > mc in half and send each half to the spool.
> > I can't use flash 8 advanced pixel features (must work in f7) so I
> > work with
> > custom white shapes in the mc's that cover the area that belongs to
> > the
> > other half.
> > Also can't use masks but can't remember right now why.  :)
>
> Without masking this is going to be an impossible task.
>
> > For example: main mc has a height of 1000 pixels.
> >
> > Part 1 still has a height of 1000 pixels but also has the white shape
> > starting at 500 y-axis that covers the part2 content
> > Part 2: same as part 1 but the white shape starts at 0 y-axis and
> > covers the
> > part 1 content.
> >
> > Now when I print part 1 there is no problem. It will start at the
> > top and
> > you won't see the part 2 content because of the white shape,
> > technically
> > speaking part 1 is still way too large to be printed of course but
> > because
> > of the white shape at the bottom that doesn't matter.
>
> There is a problem, and it doesn't have anything to do with your
> white shape. When printing a large MovieClip in Flash, it will not
> split that into 2 pages if your MC won't fit onto one page - it will
> just print what it can and will throw away the rest.
>
> > Part2, now the problem kicks in. The white space to cover the part
> > 1 content
> > is now on top. When I send part 2 to the spool all I see is white
> > and a
> > small piece of part 2 content. This is normal of course because the
> > white
> > space is the top of the mc so there isn't really a problem because
> > that's
> > how it's supposed to work.
>
> This backs up the point I made above.
>
> > So I thought I could fix this by inserting part2_mc in a new movie
> > clip and
> > position it so that the actual content starts at 0, 0 and the white
> > shape
> > lies above it.
> > But apparently this doesn't work, it seems that the printJob class
> > completely ignores that position and just sends the whole mc to the
> > spool
> > including the white shape.
> > I played around with the addPage(xMin,xMax,etc...) margin settings
> > but those
> > settings aren't of any use for my problem.
>
> Indeed, neither of those options will work. The only thing that can
> save you is masking.
>
> Cheers,
>
> Steve
>
> --
> Steve Webster
> Head of Development
>
> Featurecreep Ltd.
> www.featurecreep.com
> 14 Orchard Street, Bristol, BS1 5EH
> 0117 905 5047
>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] printJob movieclip positioning

2006-01-20 Thread Steve Webster

Hi Yves,

I'm currently making an application in flash that needs to print  
any mc that

you throw at it in a decent and structured way.

This is of course possible with the printJob class but I'm  
encountering some

positioning problems at the moment.

Scenario:

I have a very big mc (in height) and I want to print it. I decide  
to cut the

mc in half and send each half to the spool.
I can't use flash 8 advanced pixel features (must work in f7) so I  
work with
custom white shapes in the mc's that cover the area that belongs to  
the

other half.
Also can't use masks but can't remember right now why.  :)


Without masking this is going to be an impossible task.


For example: main mc has a height of 1000 pixels.

Part 1 still has a height of 1000 pixels but also has the white shape
starting at 500 y-axis that covers the part2 content
Part 2: same as part 1 but the white shape starts at 0 y-axis and  
covers the

part 1 content.

Now when I print part 1 there is no problem. It will start at the  
top and
you won't see the part 2 content because of the white shape,  
technically
speaking part 1 is still way too large to be printed of course but  
because

of the white shape at the bottom that doesn't matter.


There is a problem, and it doesn't have anything to do with your  
white shape. When printing a large MovieClip in Flash, it will not  
split that into 2 pages if your MC won't fit onto one page - it will  
just print what it can and will throw away the rest.


Part2, now the problem kicks in. The white space to cover the part  
1 content
is now on top. When I send part 2 to the spool all I see is white  
and a
small piece of part 2 content. This is normal of course because the  
white
space is the top of the mc so there isn't really a problem because  
that's

how it's supposed to work.


This backs up the point I made above.

So I thought I could fix this by inserting part2_mc in a new movie  
clip and
position it so that the actual content starts at 0, 0 and the white  
shape

lies above it.
But apparently this doesn't work, it seems that the printJob class
completely ignores that position and just sends the whole mc to the  
spool

including the white shape.
I played around with the addPage(xMin,xMax,etc...) margin settings  
but those

settings aren't of any use for my problem.


Indeed, neither of those options will work. The only thing that can  
save you is masking.


Cheers,

Steve

--
Steve Webster
Head of Development

Featurecreep Ltd.
www.featurecreep.com
14 Orchard Street, Bristol, BS1 5EH
0117 905 5047


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] printJob movieclip positioning

2006-01-20 Thread Yotam Laufer
How about masking it? You might to have your masked mc within another mc and
print the top level one, but that might work.

good luck.

On 20/01/06, Yves Peckstadt <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
>
>
> I'm currently making an application in flash that needs to print any mc
> that
> you throw at it in a decent and structured way.
>
> This is of course possible with the printJob class but I'm encountering
> some
> positioning problems at the moment.
>
> Scenario:
>
> I have a very big mc (in height) and I want to print it. I decide to cut
> the
> mc in half and send each half to the spool.
> I can't use flash 8 advanced pixel features (must work in f7) so I work
> with
> custom white shapes in the mc's that cover the area that belongs to the
> other half.
> Also can't use masks but can't remember right now why.  :)
>
> For example: main mc has a height of 1000 pixels.
>
> Part 1 still has a height of 1000 pixels but also has the white shape
> starting at 500 y-axis that covers the part2 content
> Part 2: same as part 1 but the white shape starts at 0 y-axis and covers
> the
> part 1 content.
>
> Now when I print part 1 there is no problem. It will start at the top and
> you won't see the part 2 content because of the white shape, technically
> speaking part 1 is still way too large to be printed of course but because
> of the white shape at the bottom that doesn't matter.
>
> Part2, now the problem kicks in. The white space to cover the part 1
> content
> is now on top. When I send part 2 to the spool all I see is white and a
> small piece of part 2 content. This is normal of course because the white
> space is the top of the mc so there isn't really a problem because that's
> how it's supposed to work.
>
> So I thought I could fix this by inserting part2_mc in a new movie clip
> and
> position it so that the actual content starts at 0, 0 and the white shape
> lies above it.
> But apparently this doesn't work, it seems that the printJob class
> completely ignores that position and just sends the whole mc to the spool
> including the white shape.
> I played around with the addPage(xMin,xMax,etc...) margin settings but
> those
> settings aren't of any use for my problem.
>
> I'm probably forgetting something or doing something wrong.
>
> Anyone has an idea on how I might be able to solve this problem.
>
> Thanks
>
>
>
> Yves
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



--
Yotam Laufer | Flash Developer | mobile +44 (0) 79 205 17 212
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] printJob movieclip positioning

2006-01-20 Thread Yves Peckstadt
Hi,



I'm currently making an application in flash that needs to print any mc that
you throw at it in a decent and structured way.

This is of course possible with the printJob class but I'm encountering some
positioning problems at the moment.

Scenario:

I have a very big mc (in height) and I want to print it. I decide to cut the
mc in half and send each half to the spool.
I can't use flash 8 advanced pixel features (must work in f7) so I work with
custom white shapes in the mc's that cover the area that belongs to the
other half.
Also can't use masks but can't remember right now why.  :)

For example: main mc has a height of 1000 pixels.

Part 1 still has a height of 1000 pixels but also has the white shape
starting at 500 y-axis that covers the part2 content
Part 2: same as part 1 but the white shape starts at 0 y-axis and covers the
part 1 content.

Now when I print part 1 there is no problem. It will start at the top and
you won't see the part 2 content because of the white shape, technically
speaking part 1 is still way too large to be printed of course but because
of the white shape at the bottom that doesn't matter.

Part2, now the problem kicks in. The white space to cover the part 1 content
is now on top. When I send part 2 to the spool all I see is white and a
small piece of part 2 content. This is normal of course because the white
space is the top of the mc so there isn't really a problem because that's
how it's supposed to work.

So I thought I could fix this by inserting part2_mc in a new movie clip and
position it so that the actual content starts at 0, 0 and the white shape
lies above it.
But apparently this doesn't work, it seems that the printJob class
completely ignores that position and just sends the whole mc to the spool
including the white shape.
I played around with the addPage(xMin,xMax,etc...) margin settings but those
settings aren't of any use for my problem.

I'm probably forgetting something or doing something wrong.

Anyone has an idea on how I might be able to solve this problem.

Thanks



Yves
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] PrintJob Landscape printing with Portrait

2006-01-18 Thread Steven Sacks
Here is a refined version of my function:

function printImage(mc) {
var realW = mc._width;
var realH = mc._height;
pj = new PrintJob();
var pageCount = 0;
if (pj.start()) {
var cXscale, cYscale;
if (pj.orientation.toLowerCase() != "landscape") {
mc._rotation = 90;
mc._x = mc._width;
cXscale = (pj.pageWidth / realH) * 100;
cYscale = (pj.pageHeight / realW) * 100;
} else {
cXscale = (pj.pageWidth / realW) * 100;
cYscale = (pj.pageHeight / realH) * 100;
}   
mc._xscale = mc._yscale = Math.min(cXscale, cYscale);
if (pj.addPage(mc, {xMin:0, xMax:realW, yMin:0,
yMax:realH})) {
pageCount++;
}
}
if (pageCount > 0) {
pj.send();
}
mc._xscale = mc._yscale = 100;
mc._rotation = mc._x = mc._y = 0;
delete pj;
}

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] PrintJob Landscape printing with Portrait

2006-01-17 Thread Steven Sacks
Hello everyone,

I'm posting this here in order to provide another solution to the terrible
misinformation available on Macromedia's site about how to convert a
landscape image to portrait for printing using the PrintJob class.

The code posted here at Macromedia's forums is VERY WRONG:
http://tinyurl.com/e4cuf

Real URL:
http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=288&;
threadid=1089277&enterthread=y

It's so wrong, in fact, that it took me a fair bit of debugging to figure
out just how wrong it was.  Whoever wrote it obviously didn't test the code
they posted as a solution.  It's pseudocode and you don't post pseudocode as
real code unless you're an asshat, which evollove is.  If you're on this
list, evollove, do us all a favor and don't post anymore solutions anywhere
on the web.  ;)

Here is the correct, tested code for rotating a movieclip to print as
landscape in portrait using PrintJob, for anyone who is looking for the
solution.

function printImage(mc) {
var realW = mc._width;
var realH = mc._height;
var origX = mc._x;
//
pj = new PrintJob();
var pageCount = 0;
if (pj.start()) {
var orient = pj.orientation;
if (orient.toLowerCase() != "landscape") {
mc._rotation = 90;
mc._x = mc._width;
}
var cWidth = mc._width;
var cHeight = mc._height;
var cXscale = (pj.pageWidth / cWidth) * 100;
var cYscale = (pj.pageHeight / cHeight) * 100;
mc._xscale = mc._yscale = Math.min(cXscale, cYscale);
if (pj.addPage(mc, {xMin:0, xMax:realW, yMin:0,
yMax:realH})) {
pageCount++;
}
}
if (pageCount > 0) {
pj.send();
}
mc._xscale = mc._yscale = 100;
mc._rotation = 0;
mc._x = origX;
delete pj;
}

// Explanation
Here are the places the original code was wrong and why, and how this proper
code works.  There are inconsistencies between the clip you're trying to
print and they way PrintJob handles that clip, due mostly to PrintJob being
a poorly written class, which doesn't surprise me.

When you rotate a movieclip 90 degrees, Flash swaps its _width and _height,
or rather, it returns the clip's current _width and _height, which when
rotated 90 degrees, are swapped.  If the clip was 1024x768 and you set its
_rotation = 90, its _width will now return 768 and its _height 1024.  This
is important because you're going to use the rotated width and height to
determine how much to scale the printClip down for PrintJob to print the
entire clip on the page.

When you're scaling an image you normally don't want to scale it out of
proportion, so you need to determine which scale difference is greater (the
lower of the 2 scales returned) and use that for both _xscale and _yscale
equally.  Evollove's script did not do this properly.

PrintJob is retarded in that you need to scale the target clip down for it
to print the entire clip image, but PrintJob still uses the clip's
non-scaled and non-rotated width and height as its xMax and yMax values, not
the _width and _height that Flash returns after rotation and scaling.
Evollove obviously didn't test his code because he passed the adjusted
values and didn't take the time to figure out that the PrintJob Class is
stupid.

This is important:  PrintJob requires you to rotate and scale the clip down
before you print it in order to fit the entire image on a page, but it still
wants you to pass the clip's original width and height (not adjusted for
rotation or scaling) for its print area.  Not only is this dumb and
inconsistent, it's not documented at all (nor are the properties like
orientation, pageWidth, pageHeight, etc.).  Par for the course.

Once you send the print job, reset the _xscale, _yscale, _rotation, and _x
of the clip(s) you were printing.

HTH!

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] PrintJob Class - nested MC's and some wierdo print skewing

2006-01-06 Thread Pete Hotchkiss
I have the following

var pageCount:Number = 0;
var my_pj:PrintJob = new PrintJob();

if (my_pj.start()) {

my_pj.addPage(target_mc,
xMin:0,xMax:700,yMin:0,yMax:500},
{printAsBitmap:true},
 1);

}

if (pageCount > 0)
{
my_pj.send();
}

delete my_pj;

The print job created ok.

However I have a problem when it actually print - the target_mc actually
has 2 nested clips inside it.

The print out comes out completely skewed by about 30-40 degrees, and
half the graphic is inverted. There is also NO color. I've tried 3
printers, and they all do the same.

If I passed a target clip which DOESN'T have a nested clip (ie
target_mc.someclip_mc) it all prints fine.

Any one shed any light on my frustrations.

Pete


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders