# Limit setting problem (FLA and SWF)

**URL:** <https://forum.kirupa.com/t/limit-setting-problem-fla-and-swf/60731>\
**Category:** programming\
**Created:** [August 12, 2004, 1:25am UTC](https://forum.kirupa.com/t/limit-setting-problem-fla-and-swf/60731 "2004-08-12T01:25:26Z")\
**Posts on this page:** 8\
**Page:** 2

<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:** [August 15, 2004, 4:22pm UTC](https://forum.kirupa.com/t/limit-setting-problem-fla-and-swf/60731/21 "2004-08-15T16:22:09Z")

</div>

no more helpy?

---

<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:** [August 23, 2004, 8:43pm UTC](https://forum.kirupa.com/t/limit-setting-problem-fla-and-swf/60731/22 "2004-08-23T20:43:18Z")

</div>

I know you’re back now ElPooter, so let’s get continuing.

---

<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:** [August 24, 2004, 7:04pm UTC](https://forum.kirupa.com/t/limit-setting-problem-fla-and-swf/60731/23 "2004-08-24T19:04:06Z")

</div>

Argh! How is it that we are never on Kirupa at the same time! It is Frustrating!

---

<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:** [August 25, 2004, 10:47pm UTC](https://forum.kirupa.com/t/limit-setting-problem-fla-and-swf/60731/24 "2004-08-25T22:47:35Z")

</div>

Its ok, just post what to do next and ill respond with what ive got done after that. Then you can correct me and we can continue like that

---

<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:** [August 25, 2004, 10:53pm UTC](https://forum.kirupa.com/t/limit-setting-problem-fla-and-swf/60731/25 "2004-08-25T22:53:28Z")

</div>

Ok, Where did we leave off?

---

<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:** [August 25, 2004, 11:59pm UTC](https://forum.kirupa.com/t/limit-setting-problem-fla-and-swf/60731/26 "2004-08-25T23:59:48Z")

</div>

Scrolling and AI for the cop

---

<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:** [August 26, 2004, 4:31am UTC](https://forum.kirupa.com/t/limit-setting-problem-fla-and-swf/60731/27 "2004-08-26T04:31:32Z")

</div>

Oh yeah :D. first, scrolling! Okay, scrolling is a bit more difficult then the other subjects that we have been working on. First, select the “char” again, and open his action panel. The next thing we will need is to set a scrolling speed, so in the “onLoad” we type the following:

```php
 scrollspeed = 5;

```

---

<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:** [August 26, 2004, 2:36pm UTC](https://forum.kirupa.com/t/limit-setting-problem-fla-and-swf/60731/28 "2004-08-26T14:36:56Z")

</div>

Ok, first, we need to set a speed for the scrolling. Select the [color=red]char [/color][color=black]and ope the actions. Then type in his onClipEvent(load) { the following:[/color]

```php
 scrollright = 5; 

```

then:

```php
 scrollleft = 5; 

```

and then to control if he is scrolling or not, we add, under the first two, the following:

```php
 scrolling = true; 

```

these will determine the speed for scrolling. Ok, now we start a new onClipEvent, and type the following for the scrolling right.

```php
 
onClipEvent (enterFrame) {
if (scrolling) {
if (this._x>=250) {
// this says when he is at a certain area//
if (Key.isDown(Key.RIGHT)) {
this.moveRight = 0;
//this says that he cant move right//
this.moveLeft = 5;
//this says that he can move left//
_root.bg._x -= scrollright;
//this controls the backround to scroll right//
_root.cop._x -= scrollright;
//this controls the cop to scroll right//
_root.limits._x -= scrollright;
//this controls the limits to scroll right//
scrollleft = 5;
}
  } else {
   this.moveRight = 5;
  }
 }
}

```

[Previous page](https://forum.kirupa.com/t/limit-setting-problem-fla-and-swf/60731.md?page=1)
