# Problem with calling a function

**URL:** <https://forum.kirupa.com/t/problem-with-calling-a-function/108628>\
**Category:** Uncategorized\
**Created:** [April 27, 2004, 8:51am UTC](https://forum.kirupa.com/t/problem-with-calling-a-function/108628 "2004-04-27T08:51:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Modelsinc](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@Modelsinc](https://forum.kirupa.com/u/Modelsinc)\
**Post date:** [April 27, 2004, 8:51am UTC](https://forum.kirupa.com/t/problem-with-calling-a-function/108628/1 "2004-04-27T08:51:51Z")

</div>

I´m having trouble with what I thought was a minor problem. I´ve made a simple drag-n-drop with one target. I have six dragable MCs named q21 - q26 and the target is named q2\_target. The script looks like this on MCs :

on (press) {  
startDrag(this, true);  
this.\_alpha = 85;  
oldx = this.\_x;  
oldy = this.\_y;  
}

on (release) {  
stopDrag();  
if (this.\_droptarget eq “/q2\_target”) {  
this.\_x = \_root.q2\_target.\_x;  
this.\_y = \_root.q2\_target.\_y;  
this.enabled = false;  
[color=sienna]callData(); //I want to call this function[/color]  
} else {  
setProperty(this, \_x, oldx);  
setProperty(this, \_y, oldy);  
}  
}

Everything works fine but calling that function. It doesn´t matter were I put the callData. I´ve tried making new functions that contains only a trace just to see it working… but no!

Can somebody hellp me please!
