# Variable question

**URL:** https://forum.kirupa.com/t/variable-question/11077
**Category:** flash
**Created:** [January 11, 2003, 4:55pm UTC](https://forum.kirupa.com/t/variable-question/11077 "2003-01-11T16:55:23Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Didiusthegreat](https://avatars.discourse-cdn.com/v4/letter/d/2bfe46/32.png) [@Didiusthegreat](https://forum.kirupa.com/u/Didiusthegreat)
#### Post date: [January 11, 2003, 4:55pm UTC](https://forum.kirupa.com/t/variable-question/11077/1 "2003-01-11T16:55:23Z")

</div>

Hi, I have made a map, you can zoom in; out; etc. But I want to place some limits to. So cannot make the map so tiny.

I’ve added the map, and I hope someone can help me…

I’ve uploaded it, so you can download it

[over here](http://didiusthegreat.tripod.com/Kaart.zip)

tnx in advantage… :+)

---

<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: [January 11, 2003, 5:17pm UTC](https://forum.kirupa.com/t/variable-question/11077/2 "2003-01-11T17:17:08Z")

</div>

on zoom out:  
if (\_root.kaart.kaart2.\_width \> 100){ // 100 or whatever  
\_root.kaart.kaart2.\_width -= 20;  
\_root.kaart.kaart2.\_height -= 15;  
}

on zoom out:  
if (\_root.kaart.kaart2.\_width \< 1000){ // 1000 or whatever  
\_root.kaart.kaart2.\_width += 20;  
\_root.kaart.kaart2.\_height += 15;  
}

---

<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: [January 11, 2003, 5:24pm UTC](https://forum.kirupa.com/t/variable-question/11077/3 "2003-01-11T17:24:02Z")

</div>

Duh? can you explain it please :crazy: , thnx

---

<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: [January 11, 2003, 5:26pm UTC](https://forum.kirupa.com/t/variable-question/11077/4 "2003-01-11T17:26:08Z")

</div>

Oh, I understand, that’s nice. And the moving right, and left works on the same principe?

---

<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: [January 11, 2003, 5:30pm UTC](https://forum.kirupa.com/t/variable-question/11077/5 "2003-01-11T17:30:41Z")

</div>

yeah, its just sayng, as long as you arent past this value, you can change your variables

same will be fine for movemnt

---

<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: [January 11, 2003, 5:31pm UTC](https://forum.kirupa.com/t/variable-question/11077/6 "2003-01-11T17:31:35Z")

</div>

Quite logical, anyway Thanks alot!!

---

<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: [January 11, 2003, 5:41pm UTC](https://forum.kirupa.com/t/variable-question/11077/7 "2003-01-11T17:41:49Z")

</div>

I’ve added this in the one to go to the right

onClipEvent (enterFrame) {  
if (\_root.rightover) {  
\_root.kaart.kaart2.\_x -= 5;  
}  
if (\_root.kaart.kaart2.\_x \> -20){  
\_root.kaart.kaart2.\_x -= 5  
}  
}

But the map totally flips then?
