[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Swftools-common] Reference instance inside a button
From: |
Laurent Lalanne |
Subject: |
Re: [Swftools-common] Reference instance inside a button |
Date: |
Fri, 03 Nov 2006 20:48:23 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.8.0.6) Gecko/20060730 SeaMonkey/1.0.4 |
michelts a écrit :
Look at the on_press action of the button, how can I refer to the
movieclip?
Or if I can't, how I can define an event in a movieclip (a sprite)?
Thanks for any help...
Hi,
1 - your button area refers to a sprite, it should be a shape.
2 - you need to put a sprite c1_mc in a movie.
See code bellow, it works :-)
(Simply change the c1 declaration...)
Laurent
********************
.flash filename="testbtn.swf" bbox=500x200 background=white version=6 fps=12
.png c1 "swftools_logo.png"
.box btn_area width=500 height=180 color=blue fill=blue
.sprite c1_mc
.frame 1
.put c1 scalex=50% scaley=50%
.action:
Stop();
.end
.frame 12
.change c1 scalex=100% scaley=100%
.stop
.frame 24
.change c1 scalex=50% scaley=50%
.end
.button c1_bt
.show btn_area as=area
.on_press:
c1_mc.Play();
.end
.end
.put c1_mc
.put c1_bt
.end
**********************