How about this:

Code:
x = 1
N = 0
FOR temp = Brightness to N STEP -1 ; Ramp down 1 by 1
    objectb[x] = temp

    PAUSE Speed
NEXT temp