# Just trying to Trace my Command with button and hero

**URL:** <https://forum.kirupa.com/t/just-trying-to-trace-my-command-with-button-and-hero/325835>\
**Category:** Uncategorized\
**Created:** [November 7, 2011, 4:57pm UTC](https://forum.kirupa.com/t/just-trying-to-trace-my-command-with-button-and-hero/325835 "2011-11-07T16:57:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![TalonStart](https://avatars.discourse-cdn.com/v4/letter/t/ecccb3/32.png) [@TalonStart](https://forum.kirupa.com/u/TalonStart)\
**Post date:** [November 7, 2011, 4:57pm UTC](https://forum.kirupa.com/t/just-trying-to-trace-my-command-with-button-and-hero/325835/1 "2011-11-07T16:57:40Z")

</div>

Still having a problem, pushing Button to hero… to even trace. so heres what im trying…

This is the Button Class sooo… button.as

```auto

package com.controls {
    
    import flash.display.MovieClip;
    import flash.events.MouseEvent;
    import com.Hero;
    
    public class buttons extends MovieClip {
        
        
        public function buttons() {
            // constructor code
        btn1.addEventListener(MouseEvent.CLICK,Shoot);
        }
        
        public function Shoot(event:MouseEvent):void{
        Hero.Shoot();
        }
    

```

you can see I linked my Hero.as (into the package). which is good.

This is the Hero.as (which im trying to just trace, the fact the button is pressed so i can move along).

```auto

public function Shoot()
    {
        trace "shoot";
    }

```

I included the package for the hero.as … (im not showing the full hefty doodah of the file cuase theres to much). The question is… What is missing heres the error code im getting.

G:\Adobe Flash\Projects\Nuclear Fallout AS3 - Android Market\com\controls\buttons.as, Line 16 1061: Call to a possibly undefined method Shoot through a reference with static type Class.

Any help would be thankful.  
Thanks.
