Skip to main content
Participant
March 20, 2014
Question

typeerror error #1010 a term is undefined and has no properties.

  • March 20, 2014
  • 1 reply
  • 1203 views

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.

This topic has been closed for replies.

1 reply

Ned Murphy
Legend
March 20, 2014

HAve your student go into the Flash Publish Settings and select the option to Permit Debugging.  That should help by adding the line number where the error is after the frame number in the error message.