# attachMovie variables

**URL:** <https://forum.kirupa.com/t/attachmovie-variables/253884>\
**Category:** flash\
**Created:** [March 6, 2008, 1:30am UTC](https://forum.kirupa.com/t/attachmovie-variables/253884 "2008-03-06T01:30:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![doak](https://avatars.discourse-cdn.com/v4/letter/d/d26b3c/32.png) [@doak](https://forum.kirupa.com/u/doak)\
**Post date:** [March 6, 2008, 1:30am UTC](https://forum.kirupa.com/t/attachmovie-variables/253884/1 "2008-03-06T01:30:41Z")

</div>

When I click on a button, I want to attach a movie from the library to (x,y) coordinates set up in the movie I’m attaching.

To clear that up a bit:

I have a movie clip in the library with a linkage name **my\_mc**.  
**my\_mc** has two variables ( **startx** , **starty** ) declared in it’s timeline.  
On the main timeline I have a button with instance name **my\_btn**.  
I’m trying to do something like this:

```auto
my_btn.onRelease = function(){[INDENT] _root.attachMovie("my_mc","mc",1000);
    mc._x = mc.startx;
    mc._y = mc.starty;
[/INDENT]};

```

This, however, fails miserably.
