Back story: I have a presentation, done in Flash, that has about 12 screens. Each screen is fairly text heavy and most have some sort of interaction on them. So, needless to say it runs a bit slow on some computers. I would like to break all of these “screen” out into their own swf and load and unload them (as well as interact with them when they are active).
I think this is done using the loader tag, right? And since they are animated, I would like to use the gotoAndPlay(“XX”) tag also.
After a few days of searching, reading, and failing, I have this -
red.addEventListener(MouseEvent.MOUSE_DOWN, reddown, false, 0, true);
function reddown(evt:MouseEvent):void {
var request:URLRequest = new URLRequest(“black.swf”);
var loader:Loader = new Loader();
loader.load(request);
addChild(loader);
var movie:*=loader.content;
var clip:MovieClip=movie;
clip.gotoAndPlay(“away”);
}
I am also needing to add a gotoAndPlay(“YY”) on another button to make the animation do something else when a button is clicked.
The error I am getting is - TypeError: Error #1009: Cannot access a property or method of a null object reference.
at loadTryOutsMain_fla::MainTimeline/reddown()
It also does not play at the right frame.
I am totally lost here.