I i have designed a site where content is loaded into a holder movieclip, once the main section is loaded into the holder movieclip there are items on there that the user can click to go to the other sections, but the items wont load, all i get is an error saying:
[AS]
TypeError: Error #1010: A term is undefined and has no properties.
at MethodInfo-5()[/AS]
the code to load the new content is placed on the main content movie clip which is loaded into the empty movieclip and it reads:
[AS]paper2.getChildByName(“websiteBttn”).addEventListener(MouseEvent.CLICK, webClick);
function webClick(evt:MouseEvent):void {
var pageLoader:Loader = new Loader();
var pageURLReq:URLRequest = new URLRequest ( “pages/AS3 Portfolio Web.swf”);
pageLoader.load(pageURLReq);
pageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);
function imageLoaded(evt:Event):void {
root.holder.addChildAt(pageLoader.content, 1 );
root.holder.removeChildAt(2);
}
}[/AS]
i tried to refer to the holder movieclip by attaching “root” which should go to the top of the level list i thought, but can any 1 help with this please? thanks