zq5
August 6th, 2009, 10:21 AM
Hello i need build a class with couple of function this is class code :
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 ? :P . Any ideas conceptions ? Plz help
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 ? :P . Any ideas conceptions ? Plz help