# Random Movement Along X Axis

**URL:** https://forum.kirupa.com/t/random-movement-along-x-axis/308736
**Category:** flash
**Created:** [April 29, 2010, 4:16am UTC](https://forum.kirupa.com/t/random-movement-along-x-axis/308736 "2010-04-29T04:16:57Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![captsin](https://avatars.discourse-cdn.com/v4/letter/c/8edcca/32.png) [@captsin](https://forum.kirupa.com/u/captsin)
#### Post date: [April 29, 2010, 4:16am UTC](https://forum.kirupa.com/t/random-movement-along-x-axis/308736/1 "2010-04-29T04:16:57Z")

</div>

Hello,

This is my first post.

I’m new to actionscript but find it as rewarding as it is challenging.

My problem is that I’d like a movie clip to randomly move along the x axis whenever the mouse is clicked by using actionscript 3.0.

The movie clip is a city skyline I have in the background.

I can get it to sort of move when a mouse is clicked with this code

var skylineTween:Tween=new Tween(skyline\_mc,“x”, Regular.easeInOut, Math.random(),85,3,true);

But it really looks sad.

Can anyone help? Am I even looking in the right direction by trying easing?

Any help would be greatly appreciated!
