Index: code/branches/MouseAPI_FS19/data/levels/MouseAPIExample.oxw
===================================================================
--- code/branches/MouseAPI_FS19/data/levels/MouseAPIExample.oxw	(revision 12302)
+++ code/branches/MouseAPI_FS19/data/levels/MouseAPIExample.oxw	(revision 12306)
@@ -31,5 +31,5 @@
     
 
-<MouseAPIExample position="100,0,0" direction="0,0,0">
+<MouseAPIExample position="100,0,0" direction="0,0,0" id=1>
     <attached> 
 	<Model position="0,0,0" mesh="cube.mesh" scale3D="10,10,10" /> 
@@ -37,5 +37,5 @@
 </MouseAPIExample>
 
-<MouseAPIExample position="100,100,0" direction="0,0,0">
+<MouseAPIExample position="100,100,0" direction="0,0,0" id=2>
     <attached> 
 	<Model position="0,0,0" mesh="sphere.mesh" scale=10 /> 
Index: code/branches/MouseAPI_FS19/src/modules/MouseAPI/mouseapiexample.cc
===================================================================
--- code/branches/MouseAPI_FS19/src/modules/MouseAPI/mouseapiexample.cc	(revision 12302)
+++ code/branches/MouseAPI_FS19/src/modules/MouseAPI/mouseapiexample.cc	(revision 12306)
@@ -1,7 +1,3 @@
 #include "mouseapiexample.h"
-#include "gametypes/Gametype.h"
-#include "infos/PlayerInfo.h"
-#include "worldentities/CameraPosition.h"
-#include "worldentities/ControllableEntity.h"
 
 namespace orxonox
@@ -21,13 +17,13 @@
 }
 
-// change the size of the cube to a random number by clicking on it
+// change the size of the cube by a random number between 0.5 and 5 by clicking on it
 void MouseAPIExample::changesizeonclick(MouseButtonCode::ByEnum mouse)
 {
-    // generate random number between 1 and 20
-    float randomnumber = std::fmax((rand()%100 + 1)/20.0,1);
-    // change the scale of the cube to this random number
+    // generate random number between 0.5 and 5
+    float randomnumber = (rand()%10+1)/2.0;
+    // scale of the cube with this random number
     this->setScale(randomnumber);
     // change the radius of the clickableObject to the new size
-    MouseAPI::getInstance().changeRadiusOfClickableObject(cubeid,randomnumber);
+    MouseAPI::getInstance().changeRadiusOfClickableObject(cubeid,randomnumber*10);
 }
 
@@ -35,16 +31,33 @@
 void MouseAPIExample::changesizeonscroll(int abs,int rel,const IntVector2& mousePos)
 {
-    // increase or decrease the size of the sphere
-    this->setScale(1+rel);
+    // get current radius of the sphere
+    float curRadius = MouseAPI::getInstance().getRadiusScroll(sphereid);
+    // set factor to 120% or 80% of the current size, depending on increase or decrease
+    float factor = curRadius/10*(1+rel/600.0);
+    //scale the sphere with this factor and change the radius
+    this->setScale(factor);
+    MouseAPI::getInstance().changeRadiusOfScrollableElement(sphereid,factor*10);
 }
 
+// standard XML-Port
 void MouseAPIExample::XMLPort(Element& xmlelement, XMLPort::Mode mode)
 {
     SUPER(MouseAPIExample, XMLPort, xmlelement, mode);
-    //todo: id xml-port
+
+    // differentiate between several objects by an identifier "id"
+    XMLPortParam(MouseAPIExample, "id", setId, getId, xmlelement, mode);
+    if(this->getId() == 1) // id == 1; cube
+    {
+        // add the cube to the list with clickable Objects, set the radius to 10, define the function changesizeonclick to be called after a left-click
+        cubeid = MouseAPI::getInstance().addClickableObject(this->getWorldPosition(),10,std::list<MouseButtonCode::ByEnum>{MouseButtonCode::Left},[this](MouseButtonCode::ByEnum mouse){this->changesizeonclick(mouse);});
+    }
+    else if(this->getId() == 2) // id == 2; sphere
+    {
+        // add the sphere to the list with scrollable Objects, set the radius to 10, define the function changesizeonscroll to be called while scrolling
+        sphereid = MouseAPI::getInstance().addScrollElement(this->getWorldPosition(), 10, [this](int abs, int rel, const IntVector2& mousePos){this->changesizeonscroll(abs,rel,mousePos);});
+    }
+
+    // activate MouseAPI
     MouseAPI::getInstance().activate();
-    cubeid = MouseAPI::getInstance().addClickableObject(this->getWorldPosition(),10,std::list<MouseButtonCode::ByEnum>{MouseButtonCode::Left},[this](MouseButtonCode::ByEnum mouse){this->changesizeonclick(mouse);});
-    //sphereid = MouseAPI::addScrollElement(this->getWorldPosition(), 10, [this](int abs, int rel, const IntVector2& mousePos){this->changesizeonscroll(abs,rel,mousePos);});
-
 }
 }
Index: code/branches/MouseAPI_FS19/src/modules/MouseAPI/mouseapiexample.h
===================================================================
--- code/branches/MouseAPI_FS19/src/modules/MouseAPI/mouseapiexample.h	(revision 12302)
+++ code/branches/MouseAPI_FS19/src/modules/MouseAPI/mouseapiexample.h	(revision 12306)
@@ -2,13 +2,9 @@
 #define MOUSEAPIEXAMPLE_H
 
-#include "OrxonoxPrereqs.h"
 #include "core/XMLPort.h"
 #include "mouseapi.h"
-#include "util/output/OutputManager.h"
-#include "util/output/ConsoleWriter.h"
+#include "core/CoreIncludes.h"
 #include "worldentities/ControllableEntity.h"
-#include "core/CoreIncludes.h"
 #include <list>
-#include <stdlib.h>
 
 namespace orxonox
@@ -22,7 +18,13 @@
     void changesizeonclick(MouseButtonCode::ByEnum mouse);
     void changesizeonscroll(int abs,int rel,const IntVector2& mousePos);
-    static std::list<MouseAPIExample> blocks;
+    inline void setId(int id)
+        { this->id = id; }
+    inline int getId() const
+        { return this->id; }
+private:
+    int id;
     ClickableObjectID cubeid;
     ScrollableElementID sphereid;
+    static std::list<MouseAPIExample> blocks;
 };
 }
