Falk Joensson's
Learning Programming with Eas
(Easy Application Script Tutorial)

Animation Demos:01. Green + Red + Blue

Here is the source code:
!
  @ 3
    g @
    @ 5
      _box[g][@] DHT'DIV:"body"
      a 51*(@+1)
      ? g=0
        c CSS'COLA:0 255 0 a
      \1
        c CSS'COLA:255 0 0 a
      \
        c CSS'COLA:0 0 255 a
      /
      ? g>0
        CSS:_box[g][@] "display:none"
      /
      CSS:_box[g][@] "background:;c"
      CSS:_box[g][@] "position:fixed"
      CSS:_box[g][@] "zIndex:";@
    /
  /
  size!
  _sf (11 13 17 19)
  TIMER:"animate" 1/25
  TIMER:"more" 9 _box?-1
/

! RESIZED
  size!
/

! TIMER
  t TIMER'COUNT
  ? THIS="more"
    @@ _box[t]
      CSS:@ "display:block"
    /
    <<
  /
  @@ _box
    g @@
    @@ @
      p t+@@^2
      CSS:@ sinX:p/_sf[g]
      CSS:@ sinY:p/_sf[g+1]
    /
  /
/

sinX x:
  r ((SIN:x)+1)/2*_w
  <<"left:";r;"px"
/

sinY y:
  r ((SIN:y)+1)/2*_h
  <<"top:";r;"px"
/

size:
  w DHT'W:"/view"
  h DHT'H:"/view"
  _w w/5
  _h h/5
  @@ _box
    @@ @
      CSS:@ "width:";_w;"px"
      CSS:@ "height:";_h;"px"
    /
  /
  _w w-_w
  _h h-_h
/
01. Green + Red + Blue
T Two Things You Need
D Donate
C Contact
Esc Search / Table of Contents
Enter