# Access of undefined property \_root

**URL:** <https://forum.kirupa.com/t/access-of-undefined-property--root/253069>\
**Category:** flash\
**Created:** [February 26, 2008, 10:29pm UTC](https://forum.kirupa.com/t/access-of-undefined-property--root/253069 "2008-02-26T22:29:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![maestro](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/maestro/32/478_2.png) [@maestro](https://forum.kirupa.com/u/maestro)\
**Post date:** [February 26, 2008, 10:29pm UTC](https://forum.kirupa.com/t/access-of-undefined-property--root/253069/1 "2008-02-26T22:29:16Z")

</div>

I just started using CS3 and I’m having some trouble.

I am getting the following error:  
Access of undefined property \_root

it refers to every instance in the code below where I use \_root

The movieclip “pages” is looping even though there is a stop(); on each frame

> import flash.events.MouseEvent;  
> weirdsville\_button\_over.addEventListener(MouseEvent.MOUSE\_OVER, weirdsville\_over);  
> function weirdsville\_over(event:MouseEvent):void {  
> if (\_root.pages.currentFrame != 2) {  
> weirdsville\_button.gotoAndStop(2);  
> }  
> }  
> weirdsville\_button\_over.addEventListener(MouseEvent.MOUSE\_OUT, weirdsville\_out);  
> function weirdsville\_out(event:MouseEvent):void {  
> if (\_root.pages.currentFrame != 2) {  
> weirdsville\_button.gotoAndStop(1);  
> }  
> }  
> weirdsville\_button\_over.addEventListener(MouseEvent.CLICK, weirdsville\_click);  
> function weirdsville\_click(event:MouseEvent):void {  
> \_root.pages.gotoAndStop(2);  
> }

Can anyone help me out? I’m not sure what I’m doing wrong.
