# Class instance - MC link problem

**URL:** <https://forum.kirupa.com/t/class-instance-mc-link-problem/64864>\
**Category:** Uncategorized\
**Created:** [September 20, 2004, 9:42pm UTC](https://forum.kirupa.com/t/class-instance-mc-link-problem/64864 "2004-09-20T21:42:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deril](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/deril/32/63_2.png) [@Deril](https://forum.kirupa.com/u/Deril)\
**Post date:** [September 20, 2004, 9:42pm UTC](https://forum.kirupa.com/t/class-instance-mc-link-problem/64864/1 "2004-09-20T21:42:15Z")

</div>

Hello,

I am exploring object orented programing in flash.  
and here is my first problem I ran into…

I want to link class instance with mc instance.

I want to create… lets say…

```auto
class player(){
 function go(){
 ...
 }
}

```

and then create MC …

lets say…

```auto
_root.player_mc

```

I want to link it so I could do

```auto
_root.player_mc.go();

```

… how to do it?

of course I can…

```auto
_root.player_mc.go = class_instance.go();

```

…  
or something… but it’s not the way I want to use classes in the flash…  
☹ I do not want to link all properties and all methods that way…  
If I will change my class… I will have to corect all such links…

can you sugest eny solution?

Thanks for your time.

GL flashing,  
Deril

---

<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:** [September 21, 2004, 3:27am UTC](https://forum.kirupa.com/t/class-instance-mc-link-problem/64864/2 "2004-09-21T03:27:52Z")

</div>

hi,

Right click the movie clip in the library, (linkage) export for ActionScript, assign it an identifier, and use your class’s name, (player) in AS 2.0 Class (in properties).

Usualy a class’s name starts with upper case: _Player_, not _player._  
This is a good practice, but if you don’t follow it, make just you always write it the same way.

---

<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:** [September 21, 2004, 10:22am UTC](https://forum.kirupa.com/t/class-instance-mc-link-problem/64864/3 "2004-09-21T10:22:35Z")

</div>

and extend MovieClip

---

<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:** [September 22, 2004, 1:23pm UTC](https://forum.kirupa.com/t/class-instance-mc-link-problem/64864/4 "2004-09-22T13:23:11Z")

</div>

THANKS!

its works…

stupid me… I allways new that it is the case… but I was misguided by one material I had…

And thanks for advice about naiming… 🙂  
I work with flash programing for 3 years… I know its important… I just skiped that in the post…

thanks, and happy flashing!
