List Info

Thread: Re: large static data and 32k limit




Re: large static data and 32k limit
country flaguser name
France
2007-03-09 15:39:21
> So here's what I don't understand.  I've tried to cut
down the array
> just enough so that it compiles without hitting the 32K
limit.
> This results in a .swf file size of 4K, not 32K.  The
actual source
> file is just over 32K, but I thought that the limit had
to do with
> the compiled bytecode, not the source file size.  Can
anyone explain
> this?

The SWF is compressed, and the 32K limit is in terms of
uncompressed data.

> Also, in an earlier message
> (http://lists.motion-twin.com/pipermail/mtasc/
2006-March/029523.html)
> Nicolas said:
> 
>> Typicaly, if the data contains only static
variables, it will work.
> 
> This in reference to removing the 32K check from
mtasc.
> 
> So if I remove the check when compiling a class that
contains just
> static data like above, can I expect mtasc to produce a
good .swf?

Yes.

Nicolas


-- 
MTASC : no more coffee break while compiling

Re: large static data and 32k limit
user name
2007-03-09 16:28:03
Another way to get around it, is to use a framescript.
You can create it using swfmill or the flash ide
Cheers
Ralf.

On 3/9/07, Nicolas Cannasse <ncannassemotion-twin.com> wrote:
> > So here's what I don't understand.  I've tried to
cut down the array
> > just enough so that it compiles without hitting
the 32K limit.
> > This results in a .swf file size of 4K, not 32K. 
The actual source
> > file is just over 32K, but I thought that the
limit had to do with
> > the compiled bytecode, not the source file size. 
Can anyone explain
> > this?
>
> The SWF is compressed, and the 32K limit is in terms of
uncompressed data.
>
> > Also, in an earlier message
> > (http://lists.motion-twin.com/pipermail/mtasc/
2006-March/029523.html)
> > Nicolas said:
> >
> >> Typicaly, if the data contains only static
variables, it will work.
> >
> > This in reference to removing the 32K check from
mtasc.
> >
> > So if I remove the check when compiling a class
that contains just
> > static data like above, can I expect mtasc to
produce a good .swf?
>
> Yes.
>
> Nicolas
>
>
> --
> MTASC : no more coffee break while compiling
>


-- 
Ralf Bokelberg <ralf.bokelberggmail.com>
Flex & Flash Consultant based in Cologne/Germany
Phone +49 (0) 221 530 15 35

-- 
MTASC : no more coffee break while compiling

Re: large static data and 32k limit
country flaguser name
United States
2007-03-09 16:31:08
>> So if I remove the check when compiling a class
that contains just
>> static data like above, can I expect mtasc to
produce a good .swf?
>
> Yes.
>
> Nicolas

Thanks.  However, when I remove the check, I still get an
error
from mtasc when the data is large, namely, an overflow in
write_i16.  For my particular case when my array has 715
elements
it compiles and when my array has 716 elements it does not
compile
(it gets the write_i16 overflow).

Is this an issue with the Flash format or is it particular
to mtasc?

I am of course generating the data by a program, so I could
arrange
to split it up into multiple classes if necessary.  If
anyone has
a favorite way of solving the problem please post.

Also, is haXe a solution -- does haXe have the same
limitations when
generating .swf?

Regards,
Trevor


-- 
MTASC : no more coffee break while compiling

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )