swftools-common
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swftools-common] A couple of questions


From: Chris Flowers
Subject: Re: [Swftools-common] A couple of questions
Date: Wed, 03 Nov 2004 21:25:31 -0500

> On Sun, Oct 31, 2004 at 09:28:30AM -0500, Chris Flowers wrote:
> > I just got the Oct 30 win32 build and the frame 0 label fix works (
thanks), however the syntax is a bit strange.
> >
> > For example:
> >
> > .flash bbox=320x240 fps=30 version=6 compress background=#CCCCCC
> >
> >   .box b1 100 100 color=black fill=blue
> >   .put b1 x=10 y=10
> >
> >   .frame 0 name="mylabel"
> >   .frame 1
> >
> >
> >   .jump b1 20 20
> >   .frame 2
> >
> >   .jump b1 30 30
> >   .action: stop(); .end
> >   .frame 3
> >
> > .end
> >
> > This will create a 3 frame movie, not 4 as you might expect.
>
> A ".frame 0" command usually doesn't do anything, as you are in frame 0
> at the start of the movie anyway.
> So the first ".frame" command in your syntax above only gives
> the first frame a name, but it does not start a new frame. (Otherwise
> the ".put" before the ".frame 0" would have to target, well... frame -1?)
>
> > This will create a 3 frame movie, not 4 as you might expect.
>
> Actually, it is a 4 frame movie. However the last frame is empty (the
> "contents" of that frame are everything between ".frame 3" and ".end")
>
> Greetings
>
> Matthias
>
>

Apologies for the length of post here....

By my tests, the above example with or without the ".frame 0" creates a 3
frame
movie when I analyze the swf's header. There is something odd somewhere.
So I ran three tests and I think I see the problem.

Example #1, the script below creates an swf that appears to be 1 frame but
the header says zero.

.flash bbox=320x240 fps=30 version=6 compress background=#CCCCCC
 .box b1 100 100 color=black fill=blue
 .put b1 x=10 y=10
.end

[HEADER]        File version: 6
[HEADER]        File is zlib compressed. Ratio: 99%
[HEADER]        File size: 100 (Depacked)
[HEADER]        Frame rate: 30.000000
[HEADER]        Frame count: 0
[HEADER]        Movie width: 320.00
[HEADER]        Movie height: 240.00
[309]         3 REFLEX
[009]         3 SETBACKGROUNDCOLOR (cc/cc/cc)
[020]        36 DEFINESHAPE3 defines id 0001
[028]         5 NAMECHARACTER adds information to id 0001 "b1"
[038]         7 EXPORTASSETS
                exports 0001 as "b1"
[01a]        12 PLACEOBJECT2 places id 0001 at depth 0001 name "b1"
[000]         0 END

There is never a show frame tag if you do not use the ".frame" command.
Both Flash MX Player and another ActiveX Player that I test with display
this fine regardless.

Example #2: Creates a 1 frame movie but puts the show frame tag in the wrong
place, coming before the place data.
The Flash MX player will display this one fine as well, but the ActiveX
player only shows an empty stage.

.flash bbox=320x240 fps=30 version=6 compress background=#CCCCCC
 .frame 1
 .box b1 100 100 color=black fill=blue
 .put b1 x=10 y=10
.end

[HEADER]        File version: 6
[HEADER]        File is zlib compressed. Ratio: 99%
[HEADER]        File size: 102 (Depacked)
[HEADER]        Frame rate: 30.000000
[HEADER]        Frame count: 1
[HEADER]        Movie width: 320.00
[HEADER]        Movie height: 240.00
[309]         3 REFLEX
[009]         3 SETBACKGROUNDCOLOR (cc/cc/cc)
[001]         0 SHOWFRAME 0 (00:00:00,000)
[020]        36 DEFINESHAPE3 defines id 0001
[028]         5 NAMECHARACTER adds information to id 0001 "b1"
[038]         7 EXPORTASSETS
                exports 0001 as "b1"
[01a]        12 PLACEOBJECT2 places id 0001 at depth 0001 name "b1"
[000]         0 END

Example #3: Creates a 1 frame movie with the show frame tag where it should
be, after the data.
Both flash players tested display it fine as expected.

.flash bbox=320x240 fps=30 version=6 compress background=#CCCCCC
 .box b1 100 100 color=black fill=blue
 .put b1 x=10 y=10
 .frame 1
.end

[HEADER]        File version: 6
[HEADER]        File is zlib compressed. Ratio: 98%
[HEADER]        File size: 102 (Depacked)
[HEADER]        Frame rate: 30.000000
[HEADER]        Frame count: 1
[HEADER]        Movie width: 320.00
[HEADER]        Movie height: 240.00
[309]         3 REFLEX
[009]         3 SETBACKGROUNDCOLOR (cc/cc/cc)
[020]        36 DEFINESHAPE3 defines id 0001
[028]         5 NAMECHARACTER adds information to id 0001 "b1"
[038]         7 EXPORTASSETS
                exports 0001 as "b1"
[01a]        12 PLACEOBJECT2 places id 0001 at depth 0001 name "b1"
[001]         0 SHOWFRAME 0 (00:00:00,000)
[000]         0 END

This forces you to count frames starting at 1 and not zero-based if you want
to generate the
tags properly, since ".frame 0 name = "mylabel" does not add a show frame
tag, only a label.

It seems the ".frame" command acts like an "insert show frame tag" and
should follow the data being placed
in order to generate the proper tag formatting to Macromedia's specs.

Thoughts?
Chris







reply via email to

[Prev in Thread] Current Thread [Next in Thread]