Hi,
I have a site I am building in AS3. I have a main SWF, site.swf, that loads the subsections as seperate SWF’s only when a user clicks on them (to save on initial load time).
For my subsections, I need to be able to communicate with the SWF that loaded it. In AS2, this was simple enough - just say something like _parent._parent.gotoAndPlay(“something”), and step up enough levels to speak to movie clips in the main SWF.
Trying to do this in AS3, however, results in errors such as this when trying to compile my subsection SWF:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
… because it thinks I am trying to communicate with something that doesn’t exist. The result is that I can’t compile my subsection SWF’s.
For example, I am unable to reference a variable in the main SWF using this code in my subsection SWF:
myText = this.parent.parent.parent.parent.sectionTitle;
Surely there must be a way to do this? Can I at least tell the Flash 9 Alpha compiler not to stop when it runs across this?
Thanks,
Graham