# Original positioning of a MC in the first frame?

**URL:** https://forum.kirupa.com/t/original-positioning-of-a-mc-in-the-first-frame/16504
**Category:** flash
**Created:** [March 25, 2003, 7:03pm UTC](https://forum.kirupa.com/t/original-positioning-of-a-mc-in-the-first-frame/16504 "2003-03-25T19:03:57Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![mooler](https://avatars.discourse-cdn.com/v4/letter/m/b4bc9f/32.png) [@mooler](https://forum.kirupa.com/u/mooler)
#### Post date: [March 25, 2003, 7:03pm UTC](https://forum.kirupa.com/t/original-positioning-of-a-mc-in-the-first-frame/16504/1 "2003-03-25T19:03:57Z")

</div>

I started a thread earlier but didn´t quite get what I wanted so I´ll try again.  
In this tut [http://www.kirupa.com/developer/mx/easing\_mouseclick.htm](http://www.kirupa.com/developer/mx/easing_mouseclick.htm)  
the MC that is used always starts in the top left corner of the swf. If you change the \_x and \_y in the (load) sentence the MC just begins at the position you told it and slides to the \_x=0 and \_y=0 position.  
I want it to stay put at the position I told it to and the when activated (by clicking the mouse) move to the mouse.

Any ideas?

I´m out of them

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 25, 2003, 7:12pm UTC](https://forum.kirupa.com/t/original-positioning-of-a-mc-in-the-first-frame/16504/2 "2003-03-25T19:12:55Z")

</div>

Just move the original movie clip in the original movie?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 25, 2003, 7:14pm UTC](https://forum.kirupa.com/t/original-positioning-of-a-mc-in-the-first-frame/16504/3 "2003-03-25T19:14:56Z")

</div>

Don’t use .\_x and .\_y… Just move it to where you wnat in the original movie…

Or you can have the movieclip be off stage before you set it to where you wnat it by using .\_x and .\_y… Another thing you might want to look for is if the movieclip is placed ina set location in any other frames… That can screw things up as well.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 25, 2003, 7:16pm UTC](https://forum.kirupa.com/t/original-positioning-of-a-mc-in-the-first-frame/16504/4 "2003-03-25T19:16:31Z")

</div>

```auto
onClipEvent (load) {
endX = this._x = yourX;
endY = this._y = yourY;
}

```

😉 =)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 25, 2003, 7:18pm UTC](https://forum.kirupa.com/t/original-positioning-of-a-mc-in-the-first-frame/16504/5 "2003-03-25T19:18:53Z")

</div>

Yeah… Next time I’ll just check out the \*\*\*\* tutorial…

I thought it was a link to a .fla… Duh…

Going back to my bed now… Before my sickness starts infesting the forums 😛

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 25, 2003, 7:19pm UTC](https://forum.kirupa.com/t/original-positioning-of-a-mc-in-the-first-frame/16504/6 "2003-03-25T19:19:34Z")

</div>

You see this is the weird part. This is the code in the MC that makes the effect.  
[AS]  
onClipEvent (load) {  
\_x = 0;  
\_y = 0;  
speed = 5;  
}  
onClipEvent (mouseDown) {  
endX = \_root.\_xmouse;  
endY = \_root.\_ymouse;  
}  
onClipEvent (enterFrame) {  
\_x += (endX-\_x)/speed;  
\_y += (endY-\_y)/speed;  
}[/AS]

And I tried setting the x and the y to different values whit the result that the MC starts at the chosen postition and then slides to the 0,0 position. I don´t get it why it always slides back to 0,0 when nothing tells it to?!

I ever tride removing the \_x and \_y values but the MC still stays put at the 0,0 position… really scary :chinaman:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 25, 2003, 7:22pm UTC](https://forum.kirupa.com/t/original-positioning-of-a-mc-in-the-first-frame/16504/7 "2003-03-25T19:22:13Z")

</div>

Yes that´s it thx all you guys!!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 25, 2003, 7:22pm UTC](https://forum.kirupa.com/t/original-positioning-of-a-mc-in-the-first-frame/16504/8 "2003-03-25T19:22:15Z")

</div>

just define the variables endX and endY like i did :-\

so if you want the movie clip at 100,100

```auto
onClipEvent (load) {
endX = this._x = 100;
endY = this._y = 100;
speed = 5;
}

```

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 25, 2003, 7:23pm UTC](https://forum.kirupa.com/t/original-positioning-of-a-mc-in-the-first-frame/16504/9 "2003-03-25T19:23:15Z")

</div>

oops… 😛  
no problem 😉
