Cont

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?