Hey, all. It kinda anoying when you cant see the cursor.
anyhow, I have a problem with a class i wrote.
I have a navigation.fla file with the accosiated ac file …
//navigation.as
package
{
import flash.display.MovieClip;
import CircleButton;
public class navigation extends MovieClip
{
//variable
private var circleBtn:CircleButton;
//public:
public function navigation()
{
placeButton();
}
//private
private function placeButton():void
{
circleBtn = new CircleButton();
addChild(circleBtn);
circleBtn.x = 20;
circleBtn.y = 20;
}
}
}
and a button which is linked through the linkage with the name CircleButton and here is the class definition. I do not know why my button wouldn;t show up on the screen.
//CircleButton.as
package
{
import flash.display.MovieClip;
import flash.events.MouseEvent;
public class CircleButton extends MovieClip
{
//public:
public function CircleButton()
{
this.buttonMode = true;
this.addEventListener(MouseEvent.MOUSE_OVER, onHover);
this.addEventListener(MouseEvent.MOUSE_OUT, offHover);
this.addEventListener(MouseEvent.CLICK, divide);
}
public function setName(btnName:*):void
{
_btnName = btnName;
}
//private:
private var _btnName:*;
private function onHover(event:MouseEvent):void
{
gotoAndPlay("glowFlag");
}
private function offHover(event:MouseEvent):void
{
gotoAndStop("first");
}
private function divide(event:MouseEvent):void
{
gotoAndPlay("clickEvent");
}
}
}
thank youl.