Ajax Layer JavaScript DHTML



DynAPI Examples - TimerX Class


dynapi.library.setPath('./dynapisrc/');
dynapi.library.include('dynapi.library');
dynapi.library.include('dynapi.api');
dynapi.library.include('dynapi.fx.TimerX');


myLayer=new DynLayer(null,135,100,130,50,'#00A000')
myClock=new DynLayer(null,270,100,200,50,'#0000A0')
myLayer.addEventListener({
  ontimer:function(e){
    var o=e.getSource()
    var src=' Tick @ 200ms 
 Tick count='+o.getTickCount()+''
    o.setHTML(src)
  }
})
myClock.addEventListener({
  ontimer:function(e){
    var o=e.getSource()
    var src='  '+new Date()+''
    o.setHTML(src)
  }
})
myLayer.startTimer(200)
myClock.startTimer(1000)
dynapi.document.addChild(myLayer)
dynapi.document.addChild(myClock)






           
       
dynapi.zip( 791 k)