# \[FMX\] Accessing textfield in movieclip from its custom class!

**URL:** <https://forum.kirupa.com/t/fmx-accessing-textfield-in-movieclip-from-its-custom-class/106069>\
**Category:** Uncategorized\
**Created:** [April 1, 2004, 4:20pm UTC](https://forum.kirupa.com/t/fmx-accessing-textfield-in-movieclip-from-its-custom-class/106069 "2004-04-01T16:20:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mafro](https://avatars.discourse-cdn.com/v4/letter/m/f19dbf/32.png) [@mafro](https://forum.kirupa.com/u/mafro)\
**Post date:** [April 1, 2004, 4:20pm UTC](https://forum.kirupa.com/t/fmx-accessing-textfield-in-movieclip-from-its-custom-class/106069/1 "2004-04-01T16:20:20Z")

</div>

Hey,

Ive written a little OO code for a listitem class. I created a ListItem movieclip in the library and associated my class with it, inheriting from MovieClip:

//constructor  
PlaylistItem = function(){}  
//inherit from MovieClip  
PlaylistItem.prototype = new MovieClip();  
//register class with library object  
Object.registerClass(“playlistitem\_mc”, PlaylistItem);

This works fine. The problem arises when i try to access the dynamic textfield item thats in the “playlistitem\_mc” movieclip. No matter how i reference it, i just cant get the value in or out:

PlayListItem.prototype.onRollOver = function(){  
trace(this.title\_txt.text);  
}

This always fails.

Any ideas? Is it possible to access an object in a movieclip from a bound class? Surely it can be done…

Thanks guys, this is the greatest flash site ive found ever!  
Mafro
