# Could someone explain this? :D

**URL:** <https://forum.kirupa.com/t/could-someone-explain-this-d/276065>\
**Category:** flash\
**Created:** [November 21, 2008, 10:38pm UTC](https://forum.kirupa.com/t/could-someone-explain-this-d/276065 "2008-11-21T22:38:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![saxx](https://avatars.discourse-cdn.com/v4/letter/s/f04885/32.png) [@saxx](https://forum.kirupa.com/u/saxx)\
**Post date:** [November 21, 2008, 10:38pm UTC](https://forum.kirupa.com/t/could-someone-explain-this-d/276065/1 "2008-11-21T22:38:08Z")

</div>

I have a blank MovieClip in the library with linkage myClip.

```php
var mc_clip:myClip = new myClip();

addChild(mc_clip)
mc_clip.myVar = "Hello there"

mc_clip.name = 'mc_clip2'

getChildByName('mc_clip2').x = 20 //works

trace((getChildByName('mc_clip2') as Object).myVar) // returns "hello there"

trace((getChildByName('mc_clip2') as MovieClip).myVar) // returns "hello there"

(this.getChildByName("mc_clip2") as MovieClip).myVar = "Nevermind" //doesn't work.

(this.getChildByName("mc_clip2") as MovieClip).myVar2 = "Nevermind" // doesn't work

(this.getChildByName("mc_clip2") as MovieClip).x = 200 // doesn't work

```

I get “value is not a function”, and i’m not quite sure why.
