gnash-dev
[Top][All Lists]
Advanced

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

[Gnash-dev] Re: bug #21149: Regression: hello.swf


From: strk
Subject: [Gnash-dev] Re: bug #21149: Regression: hello.swf
Date: Tue, 25 Sep 2007 16:33:44 +0200

Info from the openlaslzo developers about DefineSprite with NO frames in it.

----- Forwarded message from Henry Minsky <address@hidden> -----

Date: Tue, 25 Sep 2007 09:44:21 -0400
From: "Henry Minsky" <address@hidden>
Subject: Re: [Laszlo-dev] Sprites with 0 frames in them
To: "OpenLaszlo Developers" <address@hidden>

Here's the swfdump of that hello.swf

[HEADER]        File version: 7
[HEADER]        File is zlib compressed. Ratio: 33%
[HEADER]        File size: 257307 (Depacked)
[HEADER]        Frame rate: 30.000000
[HEADER]        Frame count: 1
[HEADER]        Movie width: 500.00
[HEADER]        Movie height: 400.00
[009]         3 SETBACKGROUNDCOLOR (ff/ff/ff)
[020]        30 DEFINESHAPE3 defines id 0001
[022]        87 DEFINEBUTTON2 defines id 0002
[01a]        32 PLACEOBJECT2 places id 0002 at depth 0009 name
"__offscreenkeyclip"
[022]        20 DEFINEBUTTON2 defines id 0003
[027]         4 DEFINESPRITE defines id 0004
[00c]         2          DOACTION
[001]         0          SHOWFRAME 1 (00:00:00,000)
[01a]         5          PLACEOBJECT2 places id 0003 at depth 0001
[001]         0          SHOWFRAME 2 (00:00:00,033)
[000]         0          END
[01a]        26 PLACEOBJECT2 places id 0004 at depth 0011 name
"entercontrol"
[027]         4 DEFINESPRITE defines id 0005
[000]         0          END
[01a]       433 PLACEOBJECT2 places id 0005 at depth 0002 name "frameupdate"
has action code
[027]         4 DEFINESPRITE defines id 0006
[000]         0          END
[038]        10 EXPORTASSETS
                exports 0006 as "empty"


I think those two sprites are used for the "frameupdate" and "empty"
movieclips. The frameupdate is a thing
which seems to be passing events from swf up to the Laszlo runtime. The
"empty" movieclip
is used as an arg to attachMovie  in various places by loaders that need a
new movieclip to load media
into.


Here's the code from compiler/SWFFile.java that is generating those

            // 2. Movieclip called 'entercontrol' with 2 frames.
            movieClip = new Script(2);
            //  First frame of this movieclip has a stop
            movieClip.getFrameAt(0).addStopAction();
            //  Second frame of this movieclip has a button with an empty
action
            but = new Button2();
            states = ButtonRecord.HitTest;
            but.addButtonRecord(new ButtonRecord(states, rectShape, 1, at,
new CXForm()));
            but.addActionCondition(new ActionCondition(KEYCODE_ENTER<<9, new
Program()));
            movieClip.getFrameAt(1).addInstance(but, 1, null, null);
            // NOTE: mimic old laszlolibrary.swf; put at depth 11
            frame.addInstance(movieClip, 11, offScreen, null,
"entercontrol");

            // 3. movieclip called "frameupdate" which has two frames and
some clip actions:
            movieClip = new Script(2);
            // NOTE: depth=2 required in order for this to work in swf6 for
some
            // unknown reason!
            inst = frame.addInstance(movieClip, 2, null, null,
"frameupdate");
            ca = new ClipActions();
            ca.setMask(
ClipAction.KEY_DOWN|ClipAction.KEY_UP|ClipAction.MOUSE_DOWN|ClipAction.MOUSE_UP
);
            s = "_root.LzKeyboardKernel.__keyboardEvent(Key.getCode(),
'onkeydown')";
            ca.addAction(new ClipAction(ClipAction.KEY_DOWN, program(s)));
            s = "_root.LzKeyboardKernel.__keyboardEvent(Key.getCode(),
'onkeyup')";
            ca.addAction(new ClipAction(ClipAction.KEY_UP, program(s)));
            s = "_root.LzMouseKernel.__mouseEvent('onmousedown')";
            ca.addAction(new ClipAction(ClipAction.MOUSE_DOWN, program(s)));
            s = "_root.LzMouseKernel.__mouseEvent('onmouseup')";
            ca.addAction(new ClipAction(ClipAction.MOUSE_UP, program(s)));
            inst.actions = ca;

            // 4. A movieclip with the export identifier "empty" that has 1
frame with nothing in it
            empty = movieClip = new Script(1);
            export("empty", movieClip);




[022]       918 DEFINEBUTTON2 defines id 0007
[027]         4 DEFINESPRITE defines id 0008
[01a]        11          PLACEOBJECT2 places id 0007 at depth 0001 name
"but"
[001]         0          SHOWFRAME 1 (00:00:00,000)
[000]         0          END
[038]        18 EXPORTASSETS
                exports 0008 as "LzMouseEvents"
[027]         4 DEFINESPRITE defines id 0009
[01a]         7          PLACEOBJECT2 places id 0001 at depth 0001
[001]         0          SHOWFRAME 1 (00:00:00,000)
[000]         0          END
[038]        11 EXPORTASSETS
                exports 0009 as "swatch"
[03c]        10 DEFINEVIDEOSTREAM defines id 0010 (0 frames, 160x120
smoothed codec 0x00)
[027]         4 DEFINESPRITE defines id 0011
[01a]        23          PLACEOBJECT2 places id 0010 at depth 0008 name
"__lzvideo"
[001]         0          SHOWFRAME 1 (00:00:00,000)
[000]         0          END
[038]        14 EXPORTASSETS
                exports 0011 as "__LZvideo"
[027]         4 DEFINESPRITE defines id 0012
[00c]        87          DOACTION
[001]         0          SHOWFRAME 1 (00:00:00,000)
[00c]        87          DOACTION
[001]         0          SHOWFRAME 2 (00:00:00,033)
[000]         0          END
[038]        16 EXPORTASSETS
                exports 0012 as "__LZjsevent"
[00c]    254414 DOACTION
[00c]        43 DOACTION
[00c]       367 DOACTION
[00c]         2 DOACTION
[00c]         2 DOACTION
[00c]       188 DOACTION
[00c]       142 DOACTION
[00c]        41 DOACTION
[00c]         3 DOACTION
[001]         0 SHOWFRAME 1 (00:00:00,000)
[000]         0 END


On 9/25/07, Henry Minsky <address@hidden> wrote:
> Note: the source for that example is in test/hello.lzx in the
> Openlaszlo trunk branch
>
> <canvas>
>     <text bgcolor="#ccffcc">Hello OpenLaszlo!</text>
>     <view bgcolor="red" x="100" y="100"  height="40" width="40"/>
> </canvas>
>
>
> On 9/25/07, strk <address@hidden> wrote:
> > Hello all.
> > We're debugging a problem with an openlaszlo-produced SWF
> > which contain a sprite definition with 0 frames in it.
> > The header of the DefineSprite advertises 0 frames, and there's
> > indeed NO ShowFrame tag in it.
> >
> > I'd think the SWF is malformed, but I'm wondering if this
> > triggers a behaviour you expect or just don't care.
> >
> > If we should simply discard that definition as bogus or use
> > in some way.
> >
> > The testcase is attached to this bug item:
> >
> > https://savannah.gnu.org/bugs/index.php?21149
> >
> > There's only a binary there, not sure if I have the sources
> > somewhere or not at all.
> >
> > --strk;
> >
> >
>
>
> --
> Henry Minsky
> Software Architect
> address@hidden
>


-- 
Henry Minsky
Software Architect
address@hidden

----- End forwarded message -----

-- 

 ()   ASCII Ribbon Campaign
 /\   Keep it simple! 





reply via email to

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