# Parameters in function problem

**URL:** <https://forum.kirupa.com/t/parameters-in-function-problem/293987>\
**Category:** flash\
**Created:** [August 6, 2009, 2:21pm UTC](https://forum.kirupa.com/t/parameters-in-function-problem/293987 "2009-08-06T14:21:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zq5](https://avatars.discourse-cdn.com/v4/letter/z/82dd89/32.png) [@zq5](https://forum.kirupa.com/u/zq5)\
**Post date:** [August 6, 2009, 2:21pm UTC](https://forum.kirupa.com/t/parameters-in-function-problem/293987/1 "2009-08-06T14:21:07Z")

</div>

Hello i need build a class with couple of function this is class code :

```auto

package classes
{
    import flash.display.MovieClip;
    import flash.events.MouseEvent;
    import flash.text.TextField;
    import flash.text.TextFormat;
    import fl.controls.Button;

    import mx.controls.Button;
    import mx.controls.buttonBarClasses;
    
    public class Menu
    {
        public function Menu()
        {
        }

         public function mouseOn(o:Object,btn:Button):void{
             trace("on");
            
         }   
    }
    
    
}

```

My problem is that when i wanna make btn:Button like it`s in description of the class one of function parameters i all the time get error :

1046: Type was not found or was not a compile-time constant: Button.

I have googled it some hours and i don`t find anything what can help me ;/ It`s any wearder way to make it ? Same happen when i try make  
var smthing:Button = new Button();  
In function, i have imported all packages i need or bmy not ? 😛 . Any ideas conceptions ? Plz help
