Contents
Articles
Behaviors
Books
Director News
Director Web Sites
FAQ
Games
Mailing Lists
News Groups
Project Examples
Reviews
Software
Tools
Useful Web Sites
Utilities
Xtras

Don't miss these
Overlay Dragger
Function Key Keycodes
Volume Slider
Set Quality of a Flash Sprite
Larger Graphics in Director than outside
Check For Qt Version
Moving tool tip
Searching Through Text
Loungin.net
Interface Colors in all palettes
 

 

 

Behavior RUNNING LED's

Added on 6/9/2001

 

Compatibilities:
behavior D6_5 D7 D8 D8_5 Mac PC Shockwave

This item has not yet been rated

Author: KurtKoenig (website)

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.

Download PC Source    Download Mac Source
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
--   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

Send e-mail