[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Swftools-common] triggering a conditional
From: |
Pablo Rodríguez |
Subject: |
Re: [Swftools-common] triggering a conditional |
Date: |
Sun, 08 Nov 2009 08:11:31 +0100 |
User-agent: |
Thunderbird 2.0.0.23 (X11/20090817) |
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.
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.
>
> Have I understood correctly, this time round?
Yes. I'm afraid I hadn't expressed myself accurately the first time.
Thanks for your help,
Pablo
>
> =========================================================
>
> .flash filename="variables.swf" version=7 fps=12
> .outline fscreen_outline: M 62.78125 18.703125 L 43.367188 23.734375 L
> 38.390625 43.09375 L 42.109375 39.375 L 48.671875 45.9375 L 65.625
> 29.039062 L 59.0625 22.421875 L 62.78125 18.703125 z M 199.71875
> 18.703125 L 203.4375 22.421875 L 196.875 29.039062 L 213.773438 45.9375
> L 220.390625 39.375 L 224.109375 43.09375 L 219.132812 23.734375 L
> 199.71875 18.703125 z M 83.125 45.9375 C 73.429688 45.9375 65.625
> 53.742188 65.625 63.4375 L 65.625 133.4375 C 65.625 143.132812 73.429688
> 150.9375 83.125 150.9375 L 179.375 150.9375 C 189.070312 150.9375
> 196.875 143.132812 196.875 133.4375 L 196.875 63.4375 C 196.875
> 53.742188 189.070312 45.9375 179.375 45.9375 L 83.125 45.9375 z M
> 48.726562 150.9375 L 42.109375 157.5 L 38.390625 153.78125 L 43.367188
> 173.140625 L 62.78125 178.171875 L 59.0625 174.453125 L 65.625
> 167.835938 L 48.726562 150.9375 z M 213.773438 150.9375 L 196.875
> 167.835938 L 203.4375 174.453125 L 199.71875 178.171875 L 219.132812
> 173.140625 L 224.109375 153.78125 L 220.390625 157.5 L 213.773438
> 150.9375 z .end
> .outline fulls_outline: M 17.5 0 L 245 0 C 254.695312 0 262.5 7.804688
> 262.5 17.5 L 262.5 179.375 C 262.5 189.070312 254.695312 196.875 245
> 196.875 L 17.5 196.875 C 7.804688 196.875 0 189.070312 0 179.375 L 0
> 17.5 C 0 7.804688 7.804688 0 17.5 0 z .end
> .filled fscreen outline=fscreen_outline fill=#969696ff color=#969696ff
> .filled fulls outline=fulls_outline fill=#64646496 color=#64646496
> .font tahoma "../fonts/tahoma.ttf"
> .edittext dlbar font=tahoma size=8pt width=100 height=70 text="hello"
> variable=dlbar_txt
> .button fscr_button
> .show fscreen as=idle
> .show fscreen as=area
> .show fscreen as=hover
> .show fscreen as=pressed
> .end
>
> .button fs_button
> .show fulls as=idle
> .show fulls as=area
> .show fulls as=hover
> .show fulls as=pressed
> .on_release:
> show_dlbar = 1;
> _root.dlbar.text="button says dl_bar=" + show_dlbar;
> fscr_button._visible = 0;
> fs_button._visible = 0;
> .end
> .end
>
> .sprite fullscreen_button
> .put fscr_button
> .put fs_button
> .end
>
> .frame 1
> .put fullscreen_button
> .stop fullscreen_button
> .put dlbar x=0 y=0
> .action:
> show_dlbar = 0;
> dlbar.text=show_dlbar;
> if (show_dlbar == 1) {
> dlbar.text="frame 1 says dl_bar=" + show_dlbar;
> }
> else {
> dlbar.text="frame 1 says dl_bar=" + show_dlbar;
> }
> .end
> .end
>
>
> ========================================
>
>
>
Re: [Swftools-common] triggering a conditional, jean-michel.voicechat_fan, 2009/11/07