# API issue

**URL:** <https://forum.kirupa.com/t/api-issue/26458>\
**Category:** flash\
**Created:** [July 23, 2003, 9:29am UTC](https://forum.kirupa.com/t/api-issue/26458 "2003-07-23T09:29:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![swaheeli](https://avatars.discourse-cdn.com/v4/letter/s/f475e1/32.png) [@swaheeli](https://forum.kirupa.com/u/swaheeli)\
**Post date:** [July 23, 2003, 9:29am UTC](https://forum.kirupa.com/t/api-issue/26458/1 "2003-07-23T09:29:58Z")

</div>

i am trying to get the x position of my line to move, but all i’m succeding in doing is incrementing the variable pointX’s value… which is not incrementing the points position (if that makes any sense). i know i’m missing something, but cannot figure out where and why.  
any suggestions would be greatly appreciated  
thanks  
[AS]pointX = 100;  
//pointY = 100;  
draw = function (mcName, mcDpeth, mtX, mtY, ltX, ltY) {  
createEmptyMovieClip(mcName, mcDepth);  
clear();  
lineStyle(1, 0xF7C533, 100);  
moveTo(mtX, mtY);  
lineTo(ltX, ltY);  
};  
draw(“line1”, 1, pointX, 100, 20, 100);  
onEnterFrame = function () {  
btn.onRelease = function() {  
pointX += 10;  
trace(pointX);  
};  
};[/AS]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 23, 2003, 9:36am UTC](https://forum.kirupa.com/t/api-issue/26458/2 "2003-07-23T09:36:52Z")

</div>

would this do it

```auto
onEnterFrame = function () {
        btn.onRelease = function() {
draw("line1", 1, pointX, 100, 20, 100);
                pointX += 10;
                trace(pointX);
        };
};

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 23, 2003, 9:51am UTC](https://forum.kirupa.com/t/api-issue/26458/3 "2003-07-23T09:51:36Z")

</div>

ahh cheers for that ahmed… i think i was a case of not seeing the wood for the trees.  
thanks again
