# Code error 1009. Not sure how to fix. noobie here

**URL:** <https://forum.kirupa.com/t/code-error-1009-not-sure-how-to-fix-noobie-here/297490>\
**Category:** Uncategorized\
**Created:** [October 3, 2009, 3:37am UTC](https://forum.kirupa.com/t/code-error-1009-not-sure-how-to-fix-noobie-here/297490 "2009-10-03T03:37:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nolij](https://avatars.discourse-cdn.com/v4/letter/n/cab0a1/32.png) [@nolij](https://forum.kirupa.com/u/nolij)\
**Post date:** [October 3, 2009, 3:37am UTC](https://forum.kirupa.com/t/code-error-1009-not-sure-how-to-fix-noobie-here/297490/1 "2009-10-03T03:37:11Z")

</div>

i am having trouble with two codes i have inside my project.  
to give as many details i can, i have a labels layers home, threeD, art, digitalArt, and pcCaseMod. i have an actions layer below the labels layer. then below that my content layer with all my content.  
this code is on the actions layer under home:

[COLOR=Blue]stop();

// Start Main Nav

function openLabel(event:MouseEvent):void {  
switch (event.currentTarget) {  
case home\_btn :  
gotoAndStop(“home”); [COLOR=Red]this is on key 1[/COLOR]  
break;  
case threeD\_btn :  
gotoAndStop(“threeD”); [COLOR=Red]this is on key 20[/COLOR]  
break;  
case art\_btn :  
gotoAndStop(“art”); [COLOR=Red]this is on key 40[/COLOR]  
break;  
case digitalArt\_btn :  
gotoAndStop(“digitalArt”); [COLOR=Red] this is on key 60[/COLOR]  
break;  
case pcCaseMod\_btn :  
gotoAndStop(“pcCaseMod”); [COLOR=Red]this is on key 80[/COLOR]  
break;

```
    }

```

}

home\_btn.addEventListener(MouseEvent.CLICK, openLabel);  
threeD\_btn.addEventListener(MouseEvent.CLICK, openLabel);  
art\_btn.addEventListener(MouseEvent.CLICK, openLabel);  
digitalArt\_btn.addEventListener(MouseEvent.CLICK, openLabel);  
pcCaseMod\_btn.addEventListener(MouseEvent.CLICK, openLabel);

// End Main Nav[/COLOR]

on the actions “threeD” key , i have this code to do a page flip within that section: i did remove the stop(); to see if that cuased it and it was not the problem.

[COLOR=Blue]stop();[/COLOR]  
[COLOR=Blue]  
import fl.transitions.Tween;  
import fl.transitions.easing.Strong;  
import fl.transitions.TweenEvent;

container.sidea.flip.addEventListener(MouseEvent.CLICK,onflip);  
container.sideb.flip.addEventListener(MouseEvent.CLICK,onflip);  
addEventListener(Event.ENTER\_FRAME,loop);

var isStill:Boolean=true;  
var arraytween:Array = new Array();

function onflip(e:Event) {  
if (isStill) {  
arraytween.push(new Tween(container,‘rotationY’,Strong.easeOut,container.rotationY,container.rotationY+180,1,true));  
arraytween[0].addEventListener(TweenEvent.MOTION\_FINISH,reset);  
isStill=false;

}  
}  
function reset(e:Event) {  
isStill=true;  
arraytween=[];

}

function loop(e:Event) {

[COLOR=Lime] if (container.rotationY\>=90 && container.rotationY\<=270) {[/COLOR]  
container.addChild(container.sideb);  
container.scaleX=-1;  
} else {  
container.addChild(container.sidea);  
container.scaleX=1;  
}  
if (container.rotationY\>=360) {  
container.rotationY=0;  
}

}[/COLOR]

when i debug the movie,i clicked on the threeD button, then the art button. after the click on the art button this message pops up: Error #1009: Cannot access a property or method of a null object reference.  
at threeD/loop()[threeD::frame20:30]

the line i wrote in green is were the error is stemming.

im really new to this.
