• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

New Here ,
Mar 20, 2014 Mar 20, 2014

Copy link to clipboard

Copied

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.

TOPICS
ActionScript

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 20, 2014 Mar 20, 2014

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines