[Flashcoders] How to handle ScriptTimeoutError with larger PrintJobs?

2009-09-10 Thread Wenzler, Thomas
Dear Flashcoders,
I need to find a solution to the said problem:
I have an swf with a printAll function that prints out the content of a 
multiple frames mc that loads at runtime. Since the Flash.PrintJob class has a 
built in 15 second Timeout between every subsequent 
PrintJob.start()/PrintJob.addPage()/PrintJob,send() I get Timeout Errors when 
the spooling of the pages takes to long. I need to find a way to catch this 
error and at least reset my swf (I do some scaling to fit to the Print size and 
reset that later on). Right now I only catch Errors when the user cancels the 
print job or another error occurs on printing but not the Timeout. Anyway, 
here's what I tried to date:

///___
var counter=1;
var myPrintJob:PrintJob;
var currFrame;
var options:PrintJobOptions = new PrintJobOptions();
options.printAsBitmap = false;
 
function printHandler(event:MouseEvent) 
{
counter=0;
myPrintJob=new PrintJob();
var printTrigger=event.target.name;
 currFrame=ref.currentFrame;
 reset_mc();

//alles drucken
if (printTrigger==print_btn) 
{
 for (var i=1;i=ref.totalFrames;i++)
 {
 dispatchEvent(new Event(addNewPage));
 }
}
 
}
function OnAddNewPage(e:Event)
{
try
{
counter++;
if(counter==1)
{
trace(started)
myPrintJob.start();
}

//setze Printbreite
if (ref.widthmyPrintJob.paperWidth) 
{
ref.width=myPrintJob.paperWidth;
ref.scaleY=ref.scaleX;
}
trace(adding +counter)
ref.gotoAndStop(counter);
myPrintJob.addPage(ref,null,options);

if(counter==ref.totalFrames)
{
trace(sent)
myPrintJob.send();
myPrintJob=null;
//mc zurücksetzen
reset_mc();
}
}

catch(error:Error)
{
//mc zurücksetzen
trace(print error: +error);
myPrintJob=null;
reset_mc();
return;
}
catch(e:ScriptTimeoutError) 
{
// ScriptTimeoutError: Error #1502: A script has executed for 
longer than 15 seconds
trace(Timeout: +e);
reset_mc();
myPrintJob=null;
return;
}

}
function reset_mc()
{
//mc zurücksetzen
 //trace(resetting);
}

///_

Thanks for any input on this
Thomas

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


Re: [Flashcoders] sound stick around issue

2009-09-10 Thread Karl DeSaulniers

Sweet.

GL

Karl


On Sep 10, 2009, at 12:36 AM, Sam Brown wrote:


Hey Karl,

Thank you for the suggestion - you've helped me get to the bottom  
of this.
Although stopAllSounds() is AS2, that was enough of a breadcrumb to  
find the

AS3 equivalent:

// make sure you import this class:
   import flash.media.SoundMixer;
// triggered in the out transition
SoundMixer.stopAll();

I'm sure there's a more elegant way to do this, but it works. Issue  
solved,

thank you!

Best Regards,
Sam


On Wed, Sep 9, 2009 at 9:07 PM, Karl DeSaulniers  
k...@designdrumm.comwrote:



Oops I think it's actually stopAllSounds();

Karl

Sent from losPhone


On Sep 9, 2009, at 11:03 PM, Karl DeSaulniers k...@designdrumm.com
wrote:

 Well this may not stop the flv from playing and it's AS2 code, so  
there

may be an equivilant in AS3, but try.

stopAllSounds;

At the end of the out transition.

HTHs

Karl

Sent from losPhone

On Sep 9, 2009, at 8:53 PM, Sam Brown 4sambr...@gmail.com wrote:

 Hello all,


I have an issue which will probably be a softball for you guys...

Basically I have a gallery-type nav; when you click on an item, an
external
swf is loaded into a container_mc. The container_mc lives in the  
main
timeline and is simply used to tween the loaded swf in/out and  
around.


I'm accessing a close button that lives in the loaded swf via:
event.target.content.close_btn.addEventListener(MouseEvent.CLICK,
outroAnimationandUnloadContainer_mc);

In this loaded swf is an instance of the flv playback  
component.  The
close_btn to unloads the swf fine, but the audio keeps playing.  
I need

flv_playback.stop() but I'm confused how to access it.

I can't use event.target.content.flv.stop() b/c the event is a  
level

deeper
than the event.target.content.close_btn.addEventListener used  
above.


So - how do I make that flv shut-up when I unload it off the stage?

Thank you very much. Any advice is greatly appreciated.
Sam
___
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


Karl DeSaulniers
Design Drumm
http://designdrumm.com

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


[Flashcoders] disable mouse on transparent part of alpha video

2009-09-10 Thread Hans Wichman
Hi list,

I need to create a couple of talking persons on a square, using transparent
flv's for that.
But it seems the whole of the video is clickable, even the transparent part
(which is logical), is there any way to disable that?
One other option I have is copying the persons to a bitmap and check the
pixel transparency, but I'm guessing that is going to slow things down:)

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


Re: [Flashcoders] disable mouse on transparent part of alpha video

2009-09-10 Thread Glen Pike

Hi,
  
Hans Wichman wrote:

One other option I have is copying the persons to a bitmap and check the
pixel transparency, but I'm guessing that is going to slow things down:)
  
But if you are only checking transparency on a CLICK event, that is not 
going to happen to often in relation to playing the FLV right?


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


Re: [Flashcoders] disable mouse on transparent part of alpha video

2009-09-10 Thread Hans Wichman
Hi,
nope thats true, but I'm more concerned about the usability side of things,
I don want to show a cursor when you cant click, so I would have to perform
the check much more often.

regards
Hans

On Thu, Sep 10, 2009 at 1:34 PM, Glen Pike g...@engineeredarts.co.ukwrote:

 Hi,
  Hans Wichman wrote:

 One other option I have is copying the persons to a bitmap and check the
 pixel transparency, but I'm guessing that is going to slow things down:)


 But if you are only checking transparency on a CLICK event, that is not
 going to happen to often in relation to playing the FLV right?

   Glen
 ___
 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] disable mouse on transparent part of alpha video

2009-09-10 Thread Steven Sacks

Cover the video with an alpha 0 shape.  Problem solved.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] disable mouse on transparent part of alpha video

2009-09-10 Thread Glen Pike

Steven Sacks wrote:

Cover the video with an alpha 0 shape.  Problem solved.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Maybe like Steven said - use a shape over the video and insert 
cue-points for when it might be clickable.  When it's clickable, 
mouseenable the shape?

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


Re: [Flashcoders] disable mouse on transparent part of alpha video

2009-09-10 Thread Hans Wichman
Hi,
ok that might work, I'll try to mask out the shapes that have to be
clickable.
thanks folks!
Hans

On Thu, Sep 10, 2009 at 3:12 PM, Glen Pike g...@engineeredarts.co.ukwrote:

  Steven Sacks wrote:

 Cover the video with an alpha 0 shape.  Problem solved.
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


 Maybe like Steven said - use a shape over the video and insert cue-points
 for when it might be clickable.  When it's clickable, mouseenable the shape?


 ___
 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] fisheye dislpacement

2009-09-10 Thread Mendelsohn, Michael
Hi list...

I'm trying to render a spherical earth using a DisplacementMapFilter out of a 
flat movieclip of the landmasses but it isn't working too well for me.  Any 
suggestions?  I'd appreciate hearing any ideas.

Thanks,
- Michael M.

private function renderOrnament():Sprite{
var makeCirc:Function = function(isFront:Boolean, diam:uint):Shape{
// used for masks and displacement
var c:Shape = new Shape();
var m:Matrix = new Matrix();
m.createGradientBox(diam,diam);
var colors:Array = (isFront != 
true)?[0xFF,0x00]:[0x00,0xFF];
c.graphics.beginGradientFill(GradientType.RADIAL, 
colors,[1,1],[0,255],m);
c.graphics.drawEllipse(0,0,diam,diam);
c.graphics.endFill();
return c;
}
// container
var orn:Sprite = new Sprite();
// front hemisphere
var fh:Sprite = new Sprite();
orn.addChild(fh);
// front world (World is a mc of all the continents)
frontWorld = new World();
fh.addChild(frontWorld);
// front world mask
var circleMask:Shape = makeCirc(true,200);
fh.addChild(circleMask);
frontWorld.mask = circleMask;
// front world displacement
fh.filters = [new DisplacementMapFilter(new BitmapData(200,200), new 
Point(0,0), 1, 1,75, 75, DisplacementMapFilterMode.IGNORE, 1,0)];  
return orn;
}



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


[Flashcoders] slideshow works w/ ctrl Enter in Flash but not when exported....

2009-09-10 Thread Isaac Alves
Hello,

I have a FLA project with a slideshow .

When I test movie inside Flash (by pressing ctrl + enter), the
slideshow works well.

But if i run the .swf file  outside of Flash interface , it doesn´t
work, it doesn´t change the images.

Why ? How can it happen?

Thanks!

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


Re: [Flashcoders] slideshow works w/ ctrl Enter in Flash but not when exported....

2009-09-10 Thread Pedro Kostelec
Are you loading the images from an internet source?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders