xslaugh at hotmail.com
Sun Feb 2 20:28:01 EST 2003
Underneath this message is a script I have developed that creates something
that looks a lot like the flash command from HyperCard. It is designed to
go into two buttons in order to stay within the 10 line script limit. If you
want, you can combine the script into one item.
When I wrote this, my two buttons were named flash 1 and flash 2. If you
name your buttons something different, then you will need to modify the last
line of the script for button 1 so that it will work by changing the name of
the button to the name of the button you placed the script in.
The constant flashticks in the second button script specifies how long the
computer waits between each flash. It is measured in ticks.
If you want me to combine this into one script for you, email me. Also
email me if you have any problems. Enjoy!
--Button 1 script
ask "How many flashes?"
put it into flashnumber
if (flashnumber is empty) or (flashnumber is not an integer) or
(flashnumber contains "-") then put 5 into flashnumber
set the shownamme of the templatebutton to false
set the showborder of the templatebutton to false
set the rect of the templatebutton to the screenrect
set the backcolor of the templatebutton to black
create button "flashscreen"
send flashscreen to btn "flash 2"
--Button 2 Script
put the backcolor of this cd into oldbackcolor
set the backcolor of this cd to white
set the layer of btn "flashscreen" to top
repeat flashnumber times
if the opaque of btn "flashscreen" is true then
set the opaque of btn "flashscreen" to false
-- set the backcolor of btn "flashscreen" to black
set the opaque of btn "flashscreen" to true
wait flashticks ticks
set the backcolor of this cd to oldbackcolor
delete btn "flashscreen"
choose browse tool
Protect your PC - get McAfee.com VirusScan Online
More information about the Use-livecode