# Problem with oop

**URL:** <https://forum.kirupa.com/t/problem-with-oop/266320>\
**Category:** Uncategorized\
**Created:** [July 18, 2008, 10:47am UTC](https://forum.kirupa.com/t/problem-with-oop/266320 "2008-07-18T10:47:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![armen\_shlang](https://avatars.discourse-cdn.com/v4/letter/a/74df32/32.png) [@armen\_shlang](https://forum.kirupa.com/u/armen_shlang)\
**Post date:** [July 18, 2008, 10:47am UTC](https://forum.kirupa.com/t/problem-with-oop/266320/1 "2008-07-18T10:47:08Z")

</div>

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 …

```auto

//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.

```auto

//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.
