Hi there!

First of all I want to thank you very much, your ptoject seems to be
what I�ve ever searched.
I never used JavaScrpipt because of the lack of a powerful and portable
class-library. You�ve done what MS and Netscape,... werent able to do,
thanks a lot!

Hmm, I started today with dynapi-3 beta1, and I�ve a piece of code that
works great with Mozzi-1.3, Netscape-4.7/Linux but doesnt work at all
with IE6,Konqueror or Opera6.


For now its only a trial&error file, but I dont know why it doesnt work. Does anybody know why the pulling-animation (moving the mouse over other layers when mouse is pressed) doesnt work with IE?


The code is really simple:


<html>
<head>
<title>DynAPI Examples - Drag Over Event</title>
<script language="JavaScript" src="../src/dynapi.js"></script>
<script language="Javascript">
        dynapi.library.setPath('../src/');
        dynapi.library.include('dynapi.api');
        dynapi.library.include('dynapi.api.ext.DragEvent');
        dynapi.library.include('dynapi.functions.Image');
  dynapi.library.include('dynapi.gui.events.*');

</script>
<script language="Javascript">
  var l1 = new Array();
  var counter = 0;
  var clicked = false;
  var color = 'black';

dynapi.document.setTextSelectable(false);

  var el2 =
  {
                onmouseover : function(e)
    {
      if(clicked==true)
      {
        //      var s = e.getSource();
       // s.setBgColor(color);
      }
     },

     onmousemove : function(e)
     {
      if(clicked==true)
      {
                var s = e.getSource();
        s.setBgColor(color);
      }
     }
  }

  var el =
  {
    onmousedown : function(e)
    {
      var source = e.getSource();
      source.setBgColor(color);
      clicked = true;
    },

  onclick : function(e)
  {
    var s = e.getSource();
    s.setBgColor(color);
  },

  onmouseup : function(e)
  {
    clicked = false;
  },

};

  var constspace = 200;
  var lines = 0;
  for(counter=0; counter < 200;counter++)
  {
   if((counter%20==0) && counter!=0)
   {
    lines++;
   }

   l1[counter] = new DynLayer();
   l1[counter].setBgColor('gray');
   l1[counter].setSize(30, 30);
   l1[counter].setLocation((counter%20)*30, 30*lines+constspace);
   l1[counter].addEventListener(el);
   l1[counter].addEventListener(el2);
  }

  var counter2 =0;
  for(; counter2 <= counter; counter2++)
  {
       dynapi.document.addChild(l1[counter2]);
  }

  function setColor(col)
  {
    color = col;
  }
</script>
</head>
<body>
<script>
        dynapi.document.insertAllChildren();
</script>
<p>
<a href="javascript:setColor('green')">green</a>
<a href="javascript:setColor('yellow')">yellow</a>
<a href="javascript:setColor('blue')">blue</a>
<a href="javascript:setColor('red')">red</a>
<a href="javascript:setColor('white')">white</a>
<a href="javascript:setColor('black')">black</a>
</p>
</body>
</html>


Another question regarding communication with the server. As far as I�ve noticed dynapi allows this through IOElements. How is this internally handeld? As far as I know there isnt a possibility in JS to open sockets..

Sorry for nerving with my neverending newbie-questions. Thanks a lot for
this really great and cool peace software!

lg Clemens




------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Dynapi-Help mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dynapi-help

Reply via email to