Site hosted by Angelfire.com: Build your free website today!

This is a example of my textfadein and textfadeout function I wrote.
These are really good for story boards.


Home

`textfadein(text$,x,y,c,d)  -  fade text$ in, centered on x at y in color c 0-black 1-green 2-red 3-blue, d is fade in speed
`textfadeout(text$,x,y,c,d)  - same as above but fade out

`data statments are best for storing info
data "Twas the night before christmas....",3,320,100
data "and all through the house....",2,320,140
data "not a creature was stiring....",1,320,180
data "not even a mouse.",0,320,220
data "As you can see it is simple to",1,200,100," change location and color",2,400,300
data "even change the fade in and out speed",3,320,240

for q = 1 to 4
  read a$,a,x,y
  textfadein(a$,x,y,a,10)
  wait 1000
next q
restore

for q = 1 to 4
  read a$,a,x,y
  textfadeout(a$,x,y,a,1)
  wait 1
next q

for q = 1 to 3
  read a$
  read a
  read x
  read y
  textfadein(a$,x,y,a,50)
  wait 1000
  textfadeout(a$,x,y,a,10)
  wait 1000
next q
end

function textfadein(txt$,x,y,c,d)
  for f=0 to 255 step 8
    if c = 0 then ink rgb(f,f,f),0
    if c = 1 then ink rgb(f,0,0),0
    if c = 2 then ink rgb(0,f,0),0
    if c = 3 then ink rgb(0,0,f),0
    center text x,y,txt$
    wait d
  next f
endfunction

function textfadeout(txt$,x,y,c,d)
  for f=255 to 0 step -8
    if c = 0 then ink rgb(f,f,f),0
    if c = 1 then ink rgb(f,0,0),0
    if c = 2 then ink rgb(0,f,0),0
    if c = 3 then ink rgb(0,0,f),0
    center text x,y,txt$
    wait d
  next f
endfunction