Anim_event(String s, Sim_anim anim) {
    StringTokenizer st;

    st = new StringTokenizer(s, ": \n\r\t");
    if(st.nextToken().charAt(0) != 'u')
      System.out.println("Error: Anim_event - I only do 'u:' traces");
    src_ent = anim.find_entity(st.nextToken());
    st.nextToken(); // skip 'at'
    timestamp = (Double.valueOf(st.nextToken())).doubleValue();
    switch(st.nextToken().charAt(0)) {
      case('S'):
        type = SEND;
        src_port = src_ent.find_port(st.nextToken());
        data = new StringBuffer();
        while(st.hasMoreTokens())
          data.append(" " + st.nextToken());
        break;
      case('P'):
        type = PARAM;
        src_port = null;
        data = new StringBuffer();
        while(st.hasMoreTokens())
          data.append(" " + st.nextToken());
        break;
      case('C'):
	type = COMMENT;
	break;
      default:
        System.out.println("Error: Anim_event - Unrecognised event type\n\t"+s);
        break;
    }
  }