RUNNING LED's
Use a repeat loop to change the color of a number of sequentional sprites,and another one to change 'em back...Everything in a single frame.
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
-- RUNNING LED's
--
-- Use a repeat loop to change the color of a number of sequentional sprites,
-- and another one to change 'em back...Everything in a single frame.
--
-- Kurt * Belgium 06/10/2001
--
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
--This code is written for my example movie, change it to fit your needs...
on startmovie
-- this repeat loop will stop if you hold your leftmousebutton down for a few seconds...
repeat while not the mousedown
-- this depends on the number of LED sprites ...
repeat with I = 2 to 15
-- Instead of a timer I use Lingo here to count numbers, and put them in a
-- field off stage. This will cause a delay between each LED...
repeat with X = 1 to 100
put X into (member "delayfield")
end repeat
-- you can use the indexcolors for your LED lights
(sprite I). color = paletteindex(75)
updatestage
end repeat
-- this part does the same, but the opposite...
repeat with I = 15 down to 2
repeat with X = 1 to 100
put X into (member "delayfield")
end repeat
(sprite I). color = paletteindex(23)
updateStage
end repeat
end repeat
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA