swftools-common
[Top][All Lists]
Advanced

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

Re: [Swftools-common] menu


From: Ricardo Pedroso
Subject: Re: [Swftools-common] menu
Date: Sun, 21 Jun 2009 02:43:57 +0100

2009/6/17 Marek <address@hidden>:
> Simple menu,
> I am trying to create simple button menu, based on example from swftools
> site.
> The problem is that when I press next button I need to do it twice before it
> get pressed.
>
> How to make this that when I press another button the last one is no longer
> pressed and highlighted, and now that just pressed is highlighted?
>

It seems to me that there is nothing wrong with your code and nothing
wrong with swftools either.
I'm on linux/firefox and for me the alert doesn't popup so I cannot
test my explanation.

But if you dispatch the alert popup window in the
.on_release:

instead of
.on_press:

it may work.

It seems to me that the problem is when the alert pops up the flash
plugin never receive the
release event, so for flash plugin the button never was released

I suppose, what you want to do is some debugging, right?
if so, you can try this instead for debugging:

.flash bbox=530x190 version=6 name="budynek.swf" compress

#.jpeg background st_1133250475.jpg
#.put background
.box box1 color=white fill=#336633 width=150 height=40
.box box2 color=white fill=#99cc99 width=151 height=41

.outline house_outline:
       M 36.99 29.93 L 15.52 51.39 L 20.44 51.39 L 20.44 81.91
                     L 39.73 81.91 L 39.73 62.33 L 48.36 62.33
                     L 48.36 81.91 L 53.84 81.91 L 53.84 51.39
                     L 58.45 51.39 L 36.99 29.93
       M 28.79 53.70 L 34.55 53.70 L 34.55 60.60 L 28.79 60.60
                     L 28.79 53.70
.end

.outline box_outline:
       M 20.85 46.79 L 65.42 46.79 L 65.42 63.21 L 20.85 63.21 L 20.85 46.79
.end

.outline st_outline:
       M 38.71 11.21 L 33.14 28.93 L 58.85 27.07 L 14 38.79 L 38.71 11.21
.end

.outline star_outline:
       M 521,640 C 502,678 370,546 328,554 C 270,566 152,731 93,722
                 C 51,716 147,549 127,512 C 98,460 -107,400 -117,341
                 C -124,299 63,339 93,308 C 133,265 127,50 180,23
                 C 218,3 238,195 276,213 C 330,238 532,166 575,208
                 C 605,238 429,316 424,358 C 416,417 547,587 521,640
.end



.filled house outline=house_outline fill=grey color=grey
.filled box outline=box_outline fill=red color=red
.filled st outline=st_outline fill=blue color=blue
.filled star outline=star_outline fill=white color=white

#       .put box x=250 y=70
#       .put house x=200 y=25
#       .put st x=270 y=40



.button mybutton1
       .show box1 as=shape x=25 y=35  alpha=50%
       .show box2 as=hover x=25 y=35
       .show box1 as=area x=25 y=35
       .show box2 as=pressed x=25 y=35 alpha=95%
       #.show box2 as=released x=25 y=35 alpha=95%

       .on_press:
       debug.text="mybutton1 pressed";
       trace('b1');
       //this.geturl('javascript:alert(\'You pressed the mybutton1
on_press\')');

       .end
.end

.button mybutton2
   .show house as=shape x=25 y=35  alpha=50%
   .show house as=hover x=25 y=35
       .show house as=area x=25 y=35
       .show house as=pressed x=25 y=35 alpha=95%
      .on_press:
       debug.text="mybutton2 pressed";
       trace('b2');
       //this.geturl('javascript:alert(\'You pressed the mybutton2
on_press\')');

       .end
.end

.button mybutton3
   .show st as=shape x=25 y=35 alpha=50%
   .show st as=hover x=25 y=35
       .show st as=area x=25 y=35
       .show st as=pressed x=25 y=35 alpha=95%
       .on_press:
       debug.text="mybutton3 pressed";
       trace('b3');
       //this.geturl('javascript:alert(\'You pressed the mybutton3
on_press\')');

       .end
.end

.button mybutton4
   .show star as=shape x=25 y=35 alpha=50%
   .show star as=hover x=25 y=35
       .show star as=area x=25 y=35
       .show star as=pressed x=25 y=35 alpha=95%
       .on_press:
       debug.text="mybutton4 pressed";
       trace('b4');
       //this.geturl('javascript:alert(\'You pressed the mybutton4
on_press\')');

       .end
.end

.edittext debug width=350 height=20 align=left

.frame 1

   .put b1=mybutton1
   .put b2=mybutton2 y=20 red=+255
   .put b3=mybutton3 x=100 y=30 green=+255
   .put b4=mybutton4 scale=10% x=250 y=70 green=+255
   .put debug x=0 y=0

.end


To watch the trace messages you will need the standalone debug flash player.

Ricardo




reply via email to

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