Re: [Flashcoders] Framerate performance

2008-02-22 Thread Martin Klasson
Hi Stevensacks,

I ended up at your site through the flashcoders-list.
As I do enjoy having an efficient workflow, or wish that I have - I got
your jsfl-scripts.

but I wonder why you, as you are a coder want the same name of
the libraryitem also on the instance - since one libraryitem can
be having mutiple instances.

This is what I have done (having two input alerts):

if (fl.getDocumentDOM().selection.length > 0)
{
var libraryName = prompt("Library Name", "");
var mcName = prompt("MC Name", "");
if(mcName == "") mcName = libraryName;
if (libraryName != null)
{
var newMc = fl.getDocumentDOM().convertToSymbol("movie
clip", libraryName, "top left");
fl.getDocumentDOM().selection[0].name = mcName;
fl.getDocumentDOM().enterEditMode("inPlace");
var tl = fl.getDocumentDOM().getTimeline();
tl.insertFrames(2);
tl.convertToKeyframes(0, 2);
tl.addNewLayer("LABELS");
tl.convertToKeyframes(0, 2);
tl.layers[tl.currentLayer].frames[0].name = "_up";
tl.layers[tl.currentLayer].frames[1].name = "_over";
tl.layers[tl.currentLayer].frames[2].name = "_down";
tl.addNewLayer("AS");
tl.layers[tl.currentLayer].frames[0].actionScript =
"stop();n";
fl.getDocumentDOM().exitEditMode();
}
}
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Framerate performance

2008-02-14 Thread Steven Sacks
If you import a large PNG with no alpha you will have slower frame rates 
than importing the same images as a JPG even at 100% compression, 
regardless of the Flash export settings for that image.  You could set 
the PNG to export as an 80% JPG and it will still perform worse than if 
you imported a 100% JPG to begin with.


The hows and whys are interesting to know, but irrelevant.  Your 
animations will slow down if Flash has to deal with a larger source 
file.  I've done my own testing and have proven it to be true.  Since I 
can't depend on the end user having a great video card, it's more 
important to maximize performance across the board by importing 100% 
JPGs when transparent PNGs are not necessary.

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


Re: [Flashcoders] Framerate performance

2008-02-14 Thread Elia Morling

Thankyou this was the reply I wanted.

Elia

- Original Message - 
From: "Kerry Thompson" <[EMAIL PROTECTED]>

To: "'Flash Coders List'" 
Sent: Friday, February 15, 2008 12:11 AM
Subject: RE: [Flashcoders] Framerate performance



Steven Sacks wrote:


Common sense dictates that a 32 bit pixel takes more rendering
computation than a 16 bit pixel or an 8 bit pixel.


The 32-bit pixel includes an 8-bit alpha channel, and that in itself takes
more rendering time.

Your graphics card actually has more impact on rendering time than the 
color

depth. All modern graphics cards do the rendering in hardware, of course,
though that wasn't always the case.

I did some benchmarking while I was working at Disney, and we found that
24-bit graphics actually rendered faster than 16-bit. The underlying 
reason
is simple--with 24 bits, each byte represents a color (red, green, or 
blue),

and it's easy for the firmware on the graphics card to work with a
straightforward 3 bytes.

16-bit graphics are another story. You still have to represent red, green,
and blue. Basic math tells you that each color gets 5 bits--but what do 
you
do with the other bit? A 1-bit alpha channel? Ignore it? Do 6-5-5, or 
5-6-5?

Different manufacturers, and different systems, treat it differently.

Down on the hardware level, the 16-bit graphic presents other challenges.
You have to take the 16-bit word and peel off the relevant bits, and pop
them into the byte-size registers. If you're familiar with Assembly
language, you know that involves a lot of ROR, SHL, and the like. It 
happens

in hardware (actually firmware), so it's pretty fast, but the 24-bit
graphics are still easier to handle.

As far as 8-bit graphics, they are really just 24-bit graphics with a
limited range of colors (the palette). Instead of representing an actual
color, each byte is an index into a palette, so there's an additional step
there that must be performed during rendering.

It's not so simple after all.

Cordially,

Kerry Thompson


___
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] Framerate performance

2008-02-14 Thread Kerry Thompson
Steven Sacks wrote:
 
> Common sense dictates that a 32 bit pixel takes more rendering
> computation than a 16 bit pixel or an 8 bit pixel.

The 32-bit pixel includes an 8-bit alpha channel, and that in itself takes
more rendering time.

Your graphics card actually has more impact on rendering time than the color
depth. All modern graphics cards do the rendering in hardware, of course,
though that wasn't always the case.

I did some benchmarking while I was working at Disney, and we found that
24-bit graphics actually rendered faster than 16-bit. The underlying reason
is simple--with 24 bits, each byte represents a color (red, green, or blue),
and it's easy for the firmware on the graphics card to work with a
straightforward 3 bytes.

16-bit graphics are another story. You still have to represent red, green,
and blue. Basic math tells you that each color gets 5 bits--but what do you
do with the other bit? A 1-bit alpha channel? Ignore it? Do 6-5-5, or 5-6-5?
Different manufacturers, and different systems, treat it differently.

Down on the hardware level, the 16-bit graphic presents other challenges.
You have to take the 16-bit word and peel off the relevant bits, and pop
them into the byte-size registers. If you're familiar with Assembly
language, you know that involves a lot of ROR, SHL, and the like. It happens
in hardware (actually firmware), so it's pretty fast, but the 24-bit
graphics are still easier to handle.

As far as 8-bit graphics, they are really just 24-bit graphics with a
limited range of colors (the palette). Instead of representing an actual
color, each byte is an index into a palette, so there's an additional step
there that must be performed during rendering.

It's not so simple after all.

Cordially,

Kerry Thompson


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


Re: [Flashcoders] Framerate performance

2008-02-14 Thread Steven Sacks
Common sense dictates that a 32 bit pixel takes more rendering 
computation than a 16 bit pixel or an 8 bit pixel.

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


Re: [Flashcoders] Framerate performance

2008-02-14 Thread Elia Morling

Yes, they are faster or yes Flash auto-converts them to 16-bit? :)

Elia

- Original Message - 
From: "Steven Sacks" <[EMAIL PROTECTED]>

To: "Flash Coders List" 
Sent: Thursday, February 14, 2008 9:52 PM
Subject: Re: [Flashcoders] Framerate performance



Yes.


Elia Morling wrote:
Does the bit-rate used in images affect flash frame rate? For examples 
are 8-bit images faster or will Flash auto-convert them to 16-bit when 
rendering to the screen.


Thanks
Elia Morling ___
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] Framerate performance

2008-02-14 Thread Steven Sacks

Yes.


Elia Morling wrote:
Does the bit-rate used in images affect flash frame rate? For examples 
are 8-bit images faster or will Flash auto-convert them to 16-bit when 
rendering to the screen.


Thanks
Elia Morling ___
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