# This code wont work!

**URL:** https://forum.kirupa.com/t/this-code-wont-work/23102
**Category:** Uncategorized
**Created:** [June 12, 2003, 9:18pm UTC](https://forum.kirupa.com/t/this-code-wont-work/23102 "2003-06-12T21:18:58Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![BullDog\_Flash](https://avatars.discourse-cdn.com/v4/letter/b/d07c76/32.png) [@BullDog\_Flash](https://forum.kirupa.com/u/BullDog_Flash)
#### Post date: [June 12, 2003, 9:18pm UTC](https://forum.kirupa.com/t/this-code-wont-work/23102/1 "2003-06-12T21:18:58Z")

</div>

I am telling the truth this code wont work.

I got this of [Macromedia.com](http://Macromedia.com) and it wont work.

```auto
newBall.prototype.moveBall = function () { 
   this.MovieClip._x += this.deltaX;
   this.MovieClip._y += this.deltaY;
   //check if ball hits top of screen
   if (this.MovieClip._y<0) {
     this.flipY();
   }
   if (this.MovieClip._x<GamePlayArea[0] || this.MovieClip._
x>GamePlayArea[2]) {
     this.flipX();
   }
}
   if (this.MovieClip._x<GamePlayArea[0] || this.MovieClip._
x>GamePlayArea[2]) {
     this.flipX();
   }

```

It will not work!!! I also did set the GamePlayArea  
SOMEONE PLEASE HELP ME!!Please

---

<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: [June 13, 2003, 12:25am UTC](https://forum.kirupa.com/t/this-code-wont-work/23102/2 "2003-06-13T00:25:25Z")

</div>

Still No One Knows How To Fix This Code

---

<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: [June 13, 2003, 12:34am UTC](https://forum.kirupa.com/t/this-code-wont-work/23102/3 "2003-06-13T00:34:46Z")

</div>

have you set the values for deltaX, deltaY, flipY and flipX?

---

<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: [June 13, 2003, 1:18am UTC](https://forum.kirupa.com/t/this-code-wont-work/23102/4 "2003-06-13T01:18:26Z")

</div>

How do i set it.

Also what I mean when I say the code dont work an Error Box Comes up.

But could you tell me how to set the vlaues for thjose deltas and stuff.

---

<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: [June 13, 2003, 2:45am UTC](https://forum.kirupa.com/t/this-code-wont-work/23102/5 "2003-06-13T02:45:05Z")

</div>

the code seems syntatically correct, even tested it in flash. do you actually have an object defined called “newBall”?
