# Slide Y or X AS3

**URL:** https://forum.kirupa.com/t/slide-y-or-x-as3/232858
**Category:** flash
**Created:** [July 18, 2007, 11:28am UTC](https://forum.kirupa.com/t/slide-y-or-x-as3/232858 "2007-07-18T11:28:47Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![freshly](https://avatars.discourse-cdn.com/v4/letter/f/9d8465/32.png) [@freshly](https://forum.kirupa.com/u/freshly)
#### Post date: [July 18, 2007, 11:28am UTC](https://forum.kirupa.com/t/slide-y-or-x-as3/232858/1 "2007-07-18T11:28:47Z")

</div>

Hi everyone,

This is my first as3 question, god this as3 is freaking me out, anyways.

I have attached some source files…

[http://www.sbdesigns.ca/slideFiles.zip](http://www.sbdesigns.ca/slideFiles.zip)

slideY\_A2.fla file is what I would like to accomplish in as3,  
cool, easy right!!

Now my question is, how do I do this in as3?

I have started it the best I can in as3, lol!

Here is the AS2 code…

```auto
Code:
circle.onEnterFrame = function() {
	current_y = circle._y;
	slideTo_y = current_y-_root.circle_y;
	circle._y = current_y - (slideTo_y/2.5);
};
btn.onRelease = function() {
	_root.circle_y = "250";
}

```

Here is what I have in AS3 so far…

```auto
stop();

Code:
btn.addEventListener(MouseEvent.MOUSE_DOWN, SLIDEY);
function SLIDEY(event:MouseEvent):void {
	circle.y = 20;
}
btn.buttonMode = true;

```

Any help is mucho mucho appreciato, what?

* * *
