Hi,

I want to fire a redraw event from a QxTimer-EventListener. Is this possible?



window.application.main = function()
{

  var x = 0;
  var y = 0;

  var t1 = new QxTimer;
  t1.startWith(10);
    
  var w1 = new QxCanvasLayout;
  w1.setBackgroundColor("white");
  w1.setTop(50);
  w1.setLeft(50);
  w1.setWidth(640);
  w1.setHeight(480);

  var w3 = new QxTerminator;
  w3.setBackgroundColor("black");
  w3.setTop(0);
  w3.setLeft(0);
  w3.setWidth(50);
  w3.setHeight(50);
  w1.add(w3);

  var dx = 1;
  var dy = 1;

  t1.addEventListener("interval", function(e) {

        w3.setTop(x);
        w3.setLeft(y);

        x=x+dx;
        y=y+dy;

        if (x >= 300) dx = -1;
        if (x <= 0) dx = 1;

        if (y <= 0) dy = 1;
        if (y >= 400) dy = -1;

        //redraw        

        } );

this.add(w1);

};


______________________________________________________________________
XXL-Speicher, PC-Virenschutz, Spartarife & mehr: Nur im WEB.DE Club!            
Jetzt gratis testen! http://freemail.web.de/home/landingpad/?mc=021130



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to