![]() |
![]() |
![]() |
![]() |
Set up initial variables.
Next you will set up some variables for the traffic light.
- Choose "Goto declaration code" from the Code menu of the Canvas Composer.
- Type the following lines into the text area. This text could be created using the Code Sourcerer, using "Declare a new variable..." and then adjusting the various settings.
These lines of code create a variable called 'state' which stores which color the traffic light should display, and define three possible states, RED, YELLOW, and GREEN.
Data Representations, Inc. http://www.datarepresentations.com support@datarepresentations.com sales@datarepresentations.com |
![]() |
![]() |
![]() |
![]() |