coffeebeans
May 12th, 2008, 01:57 AM
Kind of a newbie, so bear with me, please. I'm setting up a minisite and have a navigation menu (functioning as a movie clip) that's meant to launch other movie clips. Code on the parent file:
var myLoader:Loader = new Loader();
addChild(myLoader);Code on the child movie clip:
stop();
function buttonClick(event:MouseEvent):void
{
gotoAndStop(event.target.name);
tyes.enabled = true;
winterpassing.enabled = true;
otherwork.enabled = true;
author.enabled = true;
event.target.enabled = true;
this.parent.myLoader.load(new URLRequest(event.target.name + ".swf"));
}
tyes.addEventListener(MouseEvent.CLICK, buttonClick);
winterpassing.addEventListener(MouseEvent.CLICK, buttonClick);
otherwork.addEventListener(MouseEvent.CLICK, buttonClick);
author.addEventListener(MouseEvent.CLICK, buttonClick);I've yanked this practically straight out of a book and have no idea why I keep getting this error message:
1119: Access of possibly undefined property myLoader through a reference with static type flash.display: DisplayObjectContainer.
this.parent.myLoader.load(new URLRequest(event.target.name + ".swf"));Any ideas? Let me know if you need clarification...not sure I explained this too well.
var myLoader:Loader = new Loader();
addChild(myLoader);Code on the child movie clip:
stop();
function buttonClick(event:MouseEvent):void
{
gotoAndStop(event.target.name);
tyes.enabled = true;
winterpassing.enabled = true;
otherwork.enabled = true;
author.enabled = true;
event.target.enabled = true;
this.parent.myLoader.load(new URLRequest(event.target.name + ".swf"));
}
tyes.addEventListener(MouseEvent.CLICK, buttonClick);
winterpassing.addEventListener(MouseEvent.CLICK, buttonClick);
otherwork.addEventListener(MouseEvent.CLICK, buttonClick);
author.addEventListener(MouseEvent.CLICK, buttonClick);I've yanked this practically straight out of a book and have no idea why I keep getting this error message:
1119: Access of possibly undefined property myLoader through a reference with static type flash.display: DisplayObjectContainer.
this.parent.myLoader.load(new URLRequest(event.target.name + ".swf"));Any ideas? Let me know if you need clarification...not sure I explained this too well.