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.