# Newb question please help

**URL:** <https://forum.kirupa.com/t/newb-question-please-help/184765>\
**Category:** Uncategorized\
**Created:** [April 7, 2006, 3:54pm UTC](https://forum.kirupa.com/t/newb-question-please-help/184765 "2006-04-07T15:54:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![joran420](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joran420/32/2329_2.png) [@joran420](https://forum.kirupa.com/u/joran420)\
**Post date:** [April 7, 2006, 3:54pm UTC](https://forum.kirupa.com/t/newb-question-please-help/184765/1 "2006-04-07T15:54:53Z")

</div>

So I have a class called Player that extends Movieclip

why wont my code to attach a movie clip work?

```auto
import GAME_CLASSES.*;
Player1 = new Player()
Player1.setName("BobZdog")
Player1.attachMovie( "MainChar" , "Character1", 75)
Player1._x = 100
Player1._y = 100
Player1.gotoAndPlay(1)
trace(Player1.getName())

```

I have the Identifier for the movie clip i want to attach set to “MainChar” , the instance that appears on stage should be called “Character1”

arggg… I tried just this to see if i could get it

```auto
 Player1 = new MovieClip()
//Player1.setName("BobZdog")
 Player1.attachMovie( "MainChar" , "Character1", 75)
 Player1._x = 100
 Player1._y = 100
 Player1.gotoAndPlay(1)

```

and it still wont work im obviously missing a key concept to atachMovie

---

<div class="post-metadata">

**Author:** ![arriba](https://avatars.discourse-cdn.com/v4/letter/a/43a26b/32.png) [@arriba](https://forum.kirupa.com/u/arriba)\
**Post date:** [April 7, 2006, 5:04pm UTC](https://forum.kirupa.com/t/newb-question-please-help/184765/2 "2006-04-07T17:04:24Z")

</div>

Player1 is a MC that exists on the stage or you are trying to create it?

If your Player1 MC don´t exist that´s the reason why it don´t works, because you are trying to attach a clip inside it.

Try this:

```auto

this.createEmptyMovieClip("Player1", this.getNextHighestDepth());
Player1.attachMovie( "MainChar" , "Character1", 75)
Player1._x = 100
Player1._y = 100
Player1.gotoAndPlay(1)

```

---

<div class="post-metadata">

**Author:** ![joran420](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joran420/32/2329_2.png) [@joran420](https://forum.kirupa.com/u/joran420)\
**Post date:** [April 7, 2006, 5:45pm UTC](https://forum.kirupa.com/t/newb-question-please-help/184765/3 "2006-04-07T17:45:04Z")

</div>

> [@arriba](#):
>
> Player1 is a MC that exists on the stage or you are trying to create it?
> 
> If your Player1 MC don´t exist that´s the reason why it don´t works, because you are trying to attach a clip inside it.
> 
> Try this:
> 
> ```auto
> 
> this.createEmptyMovieClip("Player1", this.getNextHighestDepth());
> Player1.attachMovie( "MainChar" , "Character1", 75)
> Player1._x = 100
> Player1._y = 100
> Player1.gotoAndPlay(1)
> 
> ```

yeah at the start of the clip the stage is totally blank  
alright ill try that

would i still initalize player1

```auto

Player1 = new Player() 
this.createEmptyMovieClip("Player1", this.getNextHighestDepth());
Player1.attachMovie( "MainChar" , "Character1", 75)
Player1.setName("Bob")
Player1._x = 100
Player1._y = 100
Player1.gotoAndPlay(1)

```
