mooClouds è una semplice classe mootools che inietta nella pagina elementi che si muovono autonomamente, come ad esempio nuvole.

Come per Horve, mooClouds è una classe mootools che deriva dal progetto iniziale dell’home page di eqepa.com.

La classe inietta nella pagina elementi statici e dinamici. Per elementi dinamici intendiamo elementi che si muovono autonomamente e in maniera random all’interno del contenitore che scegliamo.

Lo scopo iniziale della classe era renderizzare delle nuvole sullo sfondo della pagina, alcune statiche, altre dinamiche. La posizione, la velocità e la direzione di tutte le nuvole è scelta randomicamente.

Quick Links: demo | mooClouds Page | MooTools Forge Page | Download


Article written by

Sant' Ennio

Ennio è laureato in ingegneria informatica presso l'università di L'Aquila. Attualmente è studente del corso magistrale di ingegneria informatica presso la terza università di Roma.


  1. David (Reply) on mercoledì 3, 2010

    Love the script, but I’d like to know how do I start the effect on page load, without the user having to press the generateClouds button. Thanks. :)

    • Sant' Ennio (Reply) on mercoledì 3, 2010

      Hi David! You can create an instance of mooClouds (new) and after that you can call the generateClouds() method.
      The code should be like this:

      window.addEvent('domready', function() {
      var mc=new mooClouds({ /*OPTIONS*/ });
      mc.generateClouds();
      }

      • Robinson (Reply) on mercoledì 3, 2010

        A porovctaive insight! Just what we need!

  2. David (Reply) on mercoledì 3, 2010

    Star :)

    Thanks very much.

  3. David (Reply) on mercoledì 3, 2010

    Hey I’ve got this working great on all browsers except the dreaded IE7. It gives an error and the clouds don’t show up! Do you know anything about that?

    • Sant' Ennio (Reply) on mercoledì 3, 2010

      David thank you sooo much for the bug report! The error is caused by a extra comma in the class definition, FF, Chrome and IE8 ignored that, IE7 reports the error.
      I’m now releasing the 0.7 version of the plugin with this bug fixed. In the meantime you can delete the final comma in the definition of the class in mooClouds.js:

      var mooClouds=new Class({
      Implements:Options,
      dynCloudsNum:0,
      statCloudsNum:0,
      options:{
      maxDynClouds:0,
      maxStatClouds:0,
      cloudsClassesNum:1,
      cloudsClasses:"clouds",
      containerID:null,
      contX:null,
      contY:null //<--- here was the damn comma, delete it :)
      },
      cContSizeX:0,
      cContSizeY:0,
      cCont:null,
      //....bla bla bla

      the same fix must be applied when you create a new mooClouds intance.
      Again, thank you!

  4. David (Reply) on mercoledì 3, 2010

    Damn, y’know I should have spotted that myself, as it’s often been one of those small things which has tripped me up in the past. :)

    Thanks for the quick response and fix though.

  5. Steve (Reply) on mercoledì 3, 2010

    Star :)

    Thanks very much.