# Avoid and constrain

**URL:** <https://forum.kirupa.com/t/avoid-and-constrain/22199>\
**Category:** Uncategorized\
**Created:** [May 31, 2003, 9:35pm UTC](https://forum.kirupa.com/t/avoid-and-constrain/22199 "2003-05-31T21:35:01Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![gonzales](https://avatars.discourse-cdn.com/v4/letter/g/ac91a4/32.png) [@gonzales](https://forum.kirupa.com/u/gonzales)\
**Post date:** [May 31, 2003, 9:35pm UTC](https://forum.kirupa.com/t/avoid-and-constrain/22199/1 "2003-05-31T21:35:01Z")

</div>

hi everyone-  
ive got a question. i have a large .jpg (1600x1200) and a stage size of 700x410 with a mask of those exact porportions masking the .jpeg. what im trying to do is this: i want the large .jpg to move around (basically avoiding the mouse) but i dont want the .jpg to move completely off the stage. in other words when the large .jpg’s edge meets the edge of the stage (on any side) i want it to stop. i know i should probably be using getBounds but im unsure of how it actually works. ive searched the forums with no luck. any help would be awesome!!!

thanks!

---

<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 1, 2003, 12:11am UTC](https://forum.kirupa.com/t/avoid-and-constrain/22199/2 "2003-06-01T00:11:36Z")

</div>

[http://proto.layer51.com/d.aspx?f=658](http://proto.layer51.com/d.aspx?f=658)

---

<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 1, 2003, 2:32am UTC](https://forum.kirupa.com/t/avoid-and-constrain/22199/3 "2003-06-01T02:32:57Z")

</div>

hi,

thanks for the link. ive read through this tutorial but its not what im looking for as it relies on the MC being smaller than the stage. my image is much bigger than the stage. perhaps this is what i need but im unsure as to what to chage to make it work for me.

any ideas?

thanks.

---

<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 1, 2003, 8:26pm UTC](https://forum.kirupa.com/t/avoid-and-constrain/22199/4 "2003-06-01T20:26:14Z")

</div>

ive got no luck with this tutorial. as soon as i test my movie the .jpg jumps completely off the screen… any one have any clue as to how i could fix this?

thank you!

---

<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 2, 2003, 5:20am UTC](https://forum.kirupa.com/t/avoid-and-constrain/22199/5 "2003-06-02T05:20:38Z")

</div>

attach your .fla, i’ll fix it for you… 😉

---

<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 2, 2003, 1:06pm UTC](https://forum.kirupa.com/t/avoid-and-constrain/22199/6 "2003-06-02T13:06:41Z")

</div>

try…  
[http://www.kirupaforum.com/forums/showthread.php?s=&threadid=22380](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=22380)

…maybe that would give you some idea…

---

<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 2, 2003, 8:37pm UTC](https://forum.kirupa.com/t/avoid-and-constrain/22199/7 "2003-06-02T20:37:43Z")

</div>

kax and noxious:

thanks for your help. i figured out a bizarre method of constraining my image using a roll of duct tape, some chicken wire, a bicycle pump, and some shaving cream. but it works now so im happy. noxious: thanks for the link! but the infinite menu wasnt really what i was looking for. interesting none the less though… keep on rockin in the free world.

---

<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 3, 2003, 4:17am UTC](https://forum.kirupa.com/t/avoid-and-constrain/22199/8 "2003-06-03T04:17:02Z")

</div>

no prob… actually that same concept can be applied on “bounding” stuffs… you just modify part(s) of the codes…

glad youve made it! :thumb:
