# Can't change text format

**URL:** <https://forum.kirupa.com/t/cant-change-text-format/289197>\
**Category:** Uncategorized\
**Created:** [May 27, 2009, 1:09pm UTC](https://forum.kirupa.com/t/cant-change-text-format/289197 "2009-05-27T13:09:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxelcat](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/maxelcat/32/2854_2.png) [@maxelcat](https://forum.kirupa.com/u/maxelcat)\
**Post date:** [May 27, 2009, 1:09pm UTC](https://forum.kirupa.com/t/cant-change-text-format/289197/1 "2009-05-27T13:09:09Z")

</div>

I have a textField inside a mc. When you roll over an event is triggered.

In the fuction I can do this

```auto
event.currentTarget.getChildAt(0).text="fred";

```

and the text changes - so its being targetted

I want to change the format of the text so I thought

```auto
event.currentTarget.getChildAt(0).defaultTextFormat=mTitle_fmt;

```

but, its doesn’t work.

it says “ReferenceError: Error #1037: Cannot assign to a method setTextFormat on flash.text.TextField.  
at index001\_fla::MainTimeline/overHandler()”

Any pointers please

thanks
