swftools-common
[Top][All Lists]
Advanced

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

Re: [Swftools-common] swfc bug in first example


From: Chris Pugh
Subject: Re: [Swftools-common] swfc bug in first example
Date: Tue, 13 Jul 2010 20:15:09 +0100

On 13 July 2010 19:35, Russell Lyons <address@hidden> wrote:
> Hi, Chris.
>
> On Tue, 13 Jul 2010, Chris Pugh wrote:
>
>> On 13 July 2010 16:58, Russell Lyons <address@hidden> wrote:
>>>
>>> Dear All,
>>>
>>> There seems to be a bug that is exhibited in the very first example of
>>> swfc code: (http://www.swftools.org/swfc/swfc.html)
>>>
>>>         Code listing 1.1
>>>
>>>        .flash filename="box.swf"
>>>            .box b1 100 100 color=yellow fill=red
>>>            .put b1 pin=center scale=0%
>>>            .frame 100
>>>            .change b1 pin=center scale=100%
>>>            .frame 200
>>>            .change b1 pin=center scale=0%
>>>        .end
>>>
>>> Namely, the very first frame shows the box in the wrong position and
>>> size. It flashes very briefly (on every loop), so could be missed by a
>>> casual viewer. I thought it would have shown only if a .put statement
>>> were there, but the first .put gives it a different size. What's wrong?
>>
>> There's nothing *wrong* Russ.  it's not a bug.  The script is
>> simply doing as it's told, e.g.
>>
>>          .box b1 100 100 color=yellow fill=red
>>
>> puts a bounding box on the screen, *then*,
>>
>>           .put b1 pin=center scale=0%
>>
>> changes it.  So,  you see the full size box, *before* it gets
>> changed.
>>
>> It's up to you to neaten up the performance.   Do as you
>> would on a proper stage production, put out the lights,
>> put the cast in their places then bring up the lights.
>>
>> .flash filename="box.swf"
>>          .box b1 100 100 color=yellow fill=red
>>          .frame 1
>>          .put b1 pin=center scale=0% alpha=0%
>>          .frame 2
>>          .change b1 alpha=200%
>>          .frame 100
>>          .change b1 pin=center scale=100%
>>          .frame 200
>>          .change b1 pin=center scale=0%
>>      .end
>>
>> HTH.
>>
>> Regards,
>>
>>
>> Chris.
>
> What you give certainly works. However, I am still confused, since the
> page I gave above says: "The .box command creates the box. Every object
> that is created must also be explicitly put into the scene using .put to
> become visible." My interpretation is that the .box command does *not*
> put it visibly on the screen, yet you seem to be right in that it
> *does*. Is the tutorial wrong?
>
> Thanks,
> Russ

Let's use the theatre analogy again..
.
'.box' creates a bit of scenery.   You can make that bit of scenery any
size, shape, colour you want to.  It exists, but is still in the wings.  Only
you know  it's there.

'.put' takes the bit of scenery you made from the wings and places it on
the stage for all to view ( that if the lights are up. )

'.del' is the opposite of put.  It removes the object from the stage
and puts it back in the wings. ( It doesn't destroy it completely )

'alpha='  up and down is a simply like altering the brightness of the
follow-spot on your piece of scenery.   Now you see it, now you don't.

Better?


Chris.



reply via email to

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