start     Articole     Despre mine    

Un mesaj… miscator :-)

A inceput un nou an, asa ca am pentru tine un mesaj special…

 

Pentru a-l vedea, apasa butonul “Reseteaza afisajul” si apoi butonul “Executa programul” in caseta de mai jos.

 

(Browserul tau nu suporta Canvas!…)

 

Vrei sa vezi cum l-am facut? Urmareste video-ul de mai jos.

 

Ce-ar fi sa modifici programul astfel incat mesajul afisat sa fie altul? Incearca si spune-mi intr-un comentariu daca ai reusit.

 

Nu cunosti limba calculatoarelor? Invata ABC-ul fara dureri de cap.





1 comments
DeaconuMihai
DeaconuMihai

//program mesaj derulant "DESCHIS"

var poz_x;

var t=0;

var i;

var j;

var m=Matrice(5,42)

m[0]=0,1,1,0,0,0,1,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,0,0,1,0,0,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0]

m[1]=0,1,0,1,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0]

m[2]=0,1,0,1,0,0,1,1,0,0,0,0,1,0,0,0,1,0,0,0,0,0,1,1,1,1,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0]

m[3]=0,1,0,1,0,0,1,0,0,0,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0]

m[4]=0,1,1,1,0,0,1,1,1,0,0,1,1,0,0,0,0,1,1,0,0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0]

function FunctieDesenare()

{

var timp=TimpScurs(1000/5)

  if (timp!=0)

  {

    i=1;

    while (i<=10)

    {

      j=0;

      while(j<5)

      {

      Stinge(i,7-j);

      j=j+1; 

      }

      i=i+1;

    } 

    if(t<43)

    {

      t=t+1;

    }

    j=0

    while (j<5)

    {

      i=0

      while (i<t)

      {

        poz_x=10

        if(m[j][i]==1)

        {

          poz_x=poz_x-t+i+1;

          if(poz_x>0)

          {

            Aprinde(poz_x,7-j,VERDE);

          }

        }

        i=i+1;

      }

      if(t==43)

      {

        t=0;

      }

      j=j+1;

    }

  }

  Animeaza(FunctieDesenare);

}

StartAnimatie(FunctieDesenare)