# ActionScript3.0 output error. Type Error #1034

**URL:** https://forum.kirupa.com/t/actionscript3-0-output-error-type-error-1034/293807
**Category:** flash
**Created:** [August 4, 2009, 7:23am UTC](https://forum.kirupa.com/t/actionscript3-0-output-error-type-error-1034/293807 "2009-08-04T07:23:00Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![millielee](https://avatars.discourse-cdn.com/v4/letter/m/ecccb3/32.png) [@millielee](https://forum.kirupa.com/u/millielee)
#### Post date: [August 4, 2009, 7:23am UTC](https://forum.kirupa.com/t/actionscript3-0-output-error-type-error-1034/293807/1 "2009-08-04T07:23:00Z")

</div>

Hi everyone, Im creating a navigation menu bar, and have problem in output=)

TypeError: Error #1034: Type Coercion failed: cannot convert flash.text::TextField@3271089 to flash.display.MovieClip.  
at Untitled\_fla::MainTimeline/mouseOverButton()

my AS3.0 is as following:

[COLOR=red]import gs._;  
import gs.plugins._;  
TweenPlugin.activate([BlurFilterPlugin]);

var buttonsArray:Array = new Array(home1Button,aboutus1Button,ourservices1Butto n,ourclients1Button,ourpartners1Button,careers1But ton,contactus1Button);

for (var i:uint = 0; i \< buttonsArray.length; i++) {

```
buttonsArray*.addEventListener(MouseEvent.MOUSE_OVER, mouseOverButton);
buttonsArray*.addEventListener(MouseEvent.CLICK, buttonClicked);

```

}

buttonBackground.x = home1Button.x;  
buttonBackground.y = home1Button.y;

buttonBackground.width = home1Button.width + 10;  
buttonBackground.height = home1Button.height + 10;

TweenMax.to(buttonBackground, 0.1, {tint: Math.random() \* 0xffffff});

function mouseOverButton(e:Event):void {

```
var button:MovieClip = (MovieClip)(e.target);

var targetWidth:Number = button.width + 10;
var targetHeight:Number = button.height + 10;

TweenMax.to(buttonBackground, 0.5, {x: button.x, y: button.y,
width:targetWidth, height:targetHeight, tint: Math.random() * 0xffffff});

```

}

function buttonClicked(e:Event):void {

```
trace(e.target.name + " was clicked!");

```

}[/COLOR]

Does anyone know why this comes up or how to get rid of it? Its very urgent for me\>.\<
