Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 77806

Re: setting X axis/stage limit

$
0
0

You need to make use of conditional code that checks the current x property  to see if moving further will vilate the limit and if so you skip the movement.

 

In your right movement code it would be something like...

 

if(movieclip.x + stepsize < right_side_limit){

        movieclip.x += stepsize;

} else {

        // do nothing (or something else )

}

 

Similar code would be used in the left direction movement code.


Viewing all articles
Browse latest Browse all 77806

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>