Could someone explain this? :D

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

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.