# addChild coords?

**URL:** https://forum.kirupa.com/t/addchild-coords/277944
**Category:** flash
**Created:** [December 19, 2008, 4:53am UTC](https://forum.kirupa.com/t/addchild-coords/277944 "2008-12-19T04:53:13Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![freshrod](https://avatars.discourse-cdn.com/v4/letter/f/43a26b/32.png) [@freshrod](https://forum.kirupa.com/u/freshrod)
#### Post date: [December 19, 2008, 4:53am UTC](https://forum.kirupa.com/t/addchild-coords/277944/1 "2008-12-19T04:53:13Z")

</div>

Greetings

I’m trying to load a movieclip but am having problems getting it where I want. I thought this was how you do it, but I guess not…

```auto

stop();
fred_mc.buttonMode = true;
loop_mc.buttonMode = true;
thump_mc.buttonMode = true;
kmod_mc.buttonMode = true;
var photoGallery:galleryPhoto = new galleryPhoto();
var flashGallery:galleryFlash = new galleryFlash();
fred_mc.targetMC = photoGallery;
loop_mc.targetMC = flashGallery;
fred_mc.addEventListener(MouseEvent.ROLL_OVER, thumbOver);
fred_mc.addEventListener(MouseEvent.ROLL_OUT, thumbOut);
fred_mc.addEventListener(MouseEvent.CLICK, openPhoto);
loop_mc.addEventListener(MouseEvent.ROLL_OVER, thumbOver);
loop_mc.addEventListener(MouseEvent.ROLL_OUT, thumbOut);
//loop_mc.addEventListener(MouseEvent.CLICK, openFlash);
thump_mc.addEventListener(MouseEvent.ROLL_OVER, thumbOver);
thump_mc.addEventListener(MouseEvent.ROLL_OUT, thumbOut);
//thump_mc.addEventListener(MouseEvent.CLICK, openIllustrator);
kmod_mc.addEventListener(MouseEvent.ROLL_OVER, thumbOver);
kmod_mc.addEventListener(MouseEvent.ROLL_OUT, thumbOut);
//kmod_mc.addEventListener(MouseEvent.CLICK, openPaintings);
function thumbOver(e:MouseEvent):void
{
 e.currentTarget.gotoAndPlay("over");
}
function thumbOut(e:MouseEvent):void
{
 e.currentTarget.gotoAndPlay("out");
}
function openPhoto(e:MouseEvent):void
{
 addChild(photoGallery);
 photoGallery.x = 0;
 photoGallery.y = 0;
 photoGallery.gotoAndPlay(1);
}

```

What am I doing wrong?
