typeerror error #1010 a term is undefined and has no properties.
I have a student who is working on a short movie with a "Play" button and a progress slider. His code is as follows:
import flash.events.*;
import flash.display.Loader;
import flash.net.URLRequest;
import flash.display.MovieClip;
var loader:Loader = new Loader();
addChild(loader);
loader.mask = mask_mc;
play_mc.buttonMode = true;
play_mc.addEventListener(MouseEvent.CLICK, playClicked);
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, trackProgress);
function playClicked(event:MouseEvent):void
{
loader.load(new URLRequest("assets/vid2.swf"));
}
function trackProgress(event:ProgressEvent):void
{
var perLoaded:Number = Math.round(event.bytesLoaded / event.bytesTotal * 100);
prog_mc.gotoAndStop(perLoaded);
}
The movie will not play and he receives the following error message:
TypeError: Error #1010: A term is undefined and has no properties.
at vid2_fla::MainTimeline/frame1()
How can he fix this problem so the movie loads and the progress bar moves.
Thank you.
