+ All Categories
Home > Documents > Web viewWe will add a short pause. Then increase the brightness slightly. This loops and the...

Web viewWe will add a short pause. Then increase the brightness slightly. This loops and the...

Date post: 31-Jan-2018
Category:
Upload: doandat
View: 221 times
Download: 2 times
Share this document with a friend
3
Fading Heart 2 This heart will fade on very gradually We will create a variable. A variable will change. This will be our brightness Create a variable, set item Change the Item, which is the name of the variable, to be Brightness Set this to equal 0 Add a forever loop. Set the brightness to equal the variable brightness. At the moment this is 0 so you will see no heart We will add a short pause Then increase the brightness slightly This loops and the brightness increases slightly each time
Transcript
Page 1: Web viewWe will add a short pause. Then increase the brightness slightly. This loops and the brightness increases slightly each time. Challenge

Fading Heart 2

This heart will fade on very gradually

We will create a variable. A variable will change. This will be our brightness

Create a variable, set item

Change the Item, which is the name of the variable, to be Brightness

Set this to equal 0

Add a forever loop. Set the brightness to equal the variable brightness. At the moment this is 0 so you will see no heart

We will add a short pause

Then increase the brightness slightly

This loops and the brightness increases slightly each time

Page 2: Web viewWe will add a short pause. Then increase the brightness slightly. This loops and the brightness increases slightly each time. Challenge

Challenge

1. Experiment with the ‘pause’ and the ‘change brightness’ to change the fade effect2. Replace forever with a ‘while do’ loop to check that Brightness is < 255. If it is, then the

image fades up3. Once Brightness has reached 255 make it show string “Love”

Answers

Page 3: Web viewWe will add a short pause. Then increase the brightness slightly. This loops and the brightness increases slightly each time. Challenge

Recommended