Basic AS 2.0 to 3.0 Variable help needed!

Hi guys :smiley:

Basically I’ve been following this tutorial, here, which is for AS2, but I’ve been altering it to make it all 3.0, but around the 10/12min mark doing what is done in the video just brings a bunch of (1120: undefined property: _parent) errors. It’ll be something to do with variables, and I haven’t the best idea how to make it work for ActionScript 3.0

I’ve got so far and it’s annoying that on the final hurdle this happens, any help will be much appreciated!!!

I gues it’s something to do with the DisplayObject class? wtf does all that mean?

my code, on the main timeline. Currently only testing one image to see if it works:


var imageOne:Boolean = false;
var imageTwo:Boolean = false;
var imageThree:Boolean = false;
var imageFour:Boolean = false;
var imageFive:Boolean = false;
var imageSix:Boolean = false;

previous_btn.addEventListener(MouseEvent.CLICK, arrowPreviousFunction); 

function arrowPreviousFunction(evt:MouseEvent):void{
    if(imageOne == true){
        imagesAll_mc.gotoAndPlay("imageSix");
    }
}

Then within another movieclip on the main timeline:


_parent.imageOne = true;
_parent.imageTwo = false;
_parent.imageThree = false;
_parent.imageFour = false;
_parent.imageFive = false;
_parent.imageSix = false;