# Targeting movieclip dragged on stage

**URL:** https://forum.kirupa.com/t/targeting-movieclip-dragged-on-stage/293093
**Category:** Uncategorized
**Created:** [July 23, 2009, 5:46am UTC](https://forum.kirupa.com/t/targeting-movieclip-dragged-on-stage/293093 "2009-07-23T05:46:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![anakadote](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/anakadote/32/2119_2.png) [@anakadote](https://forum.kirupa.com/u/anakadote)
#### Post date: [July 23, 2009, 5:46am UTC](https://forum.kirupa.com/t/targeting-movieclip-dragged-on-stage/293093/1 "2009-07-23T05:46:08Z")

</div>

First let me say I’m relatively new to AS 3 and I’ve scoured the Internet looking for a simple solution to no avail.

Here’s my general situation:

1. I have dragged a movieclip with an instance name of a\_mc onto the stage.
2. On the first frame of the timeline I am importing a class file and calling its constructor:

```auto
import cardmaker.*;
var coverMaker:CoverMaker = new CoverMaker();

```

I was under the impression that since the movieclip (a\_mc) is already on the stage that I could target it from within the constructor function just by name, however, I always get a “1120: Access of undefined property a\_mc”

Simplified Class:

```auto
package cardmaker {
    import flash.display.*;

    public class CoverMaker extends MovieClip {

        public function CoverMaker():void {
        
            a_mc.gotoAndStop('on');
       }
    }
}

```

With this problem in mind, is it “better” to just dynamically position every Library object on the stage instead of dragging them manually? If so, what is the benefit?

Thanks!
