[Top][All Lists]

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

Re: [Swftools-common] triggering a conditional

From: Chris Pugh
Subject: Re: [Swftools-common] triggering a conditional
Date: Sun, 8 Nov 2009 11:02:11 +0000

2009/11/8 Pablo Rodríguez <address@hidden>:
> Thanks for the reply, Chris.
> Chris Pugh wrote:
>> Pablo,
>> 2009/11/7 Pablo Rodríguez <address@hidden>:
>>> I hope it is clear now. The conditional doesn't seem to work in the
>>> code. What am I missing there?
>> Confusion aside .. ;o)
>> The conditional does work. [...] Code posted below.
>> What I am not understanding is why you are doing this,
>>          show_dlbar = 0;
>>          if (show_dlbar == 1)  { spme code }   // ????
>> If you are setting show_dlbar to zero, why are you then checking for
>> exact equality with 1?
>> Since you've just set show_dlbar to zero, how can i possibly *ever* be
>> equal to 1??
>> ( scratches head )
> I add to fs_button .on_release: show_dlbar=1, so it might be equal to 1.

As the code shows, that is exactly what happens.  It does get set to 1.

>  This should have triggered the original conditional and redraw the
> presentation to fullscreen. Conditional, as you have shown, does work,
> but I wonder why it does not work in its original form.

Because the lines of code which contain the conditional are pegged at frame
1, which has already run, so how is ever going to check again?   Even if it were
to run again,  those lines of code run in sequence don't they?  And when they
do, that  means you've set show_dlbbar back to 0 before the conditional runs
( and thus it fails your check! ).

Does that make sense?

The only way I can see round this at the moment is polling code, i.e. a timing
loop that periodically checks the value of show_dlbar.  Something like,

   interval = setInterval (your_function(), Time in milliseconds]);

>> Have I understood correctly, this time round?
> Yes. I'm afraid I hadn't expressed myself accurately the first time.

At least we are now both on the same page! ( It was all those fscreens what did
M'Lud ;o)  )

> Thanks for your help,

Hopefully I was some,  this time around.



reply via email to

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