# Cont

**URL:** <https://forum.kirupa.com/t/cont/313347>\
**Category:** Uncategorized\
**Created:** [August 26, 2010, 5:08pm UTC](https://forum.kirupa.com/t/cont/313347 "2010-08-26T17:08:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![punk123123123](https://avatars.discourse-cdn.com/v4/letter/p/9de0a6/32.png) [@punk123123123](https://forum.kirupa.com/u/punk123123123)\
**Post date:** [August 26, 2010, 5:08pm UTC](https://forum.kirupa.com/t/cont/313347/1 "2010-08-26T17:08:31Z")

</div>

i wanna have this movieclip called apple to spawn but at random from the right hand side axis y =0 to the left hand side where by it will disappear at the 3/4 of the stage. does anyone knows how??

the last time there is a forum user who put this solution but i cant seem to make it work…

apple.x +=10;  
//move to right

apple.x -=10;  
//move to left

but i need to have a boundary.

the boundary is 3/4 of the stage and the movieclip is moving from the center of the y axis = 0, at the most right and the moving till 3/4 of the stage towards the left… after it reach 3/4 of the stage, it would disappear

the user told me to set a boundary like this:  
var vanishBoundary1 : int = stage.stageWidth / 4 \* 3 ;  
if (apple.x \>= vanishBoundary1 )  
{  
parent.removeChild(apple);  
}

but apparently unable to do it in a class…i wanna it to be in a class AS file to enable easy usage to the main stage Fla file…

can anyone help?
