1017 The definition of base class _ was not found.

Description 1
You may get this error from importing a custom class that does not have the proper package path into a parent class. Another reason you will get this error is if you forget to import the Class that the subclass is extending(see example 2).

Bad Code 1
(subClass called ImportedClass)
[as]
package
{import flash.display.MovieClip;
public class ImportedClass extends MovieClip
{
public function ImportingClass()
{
trace(“Message”);}}}

Parent Class called ImportingClass

package com.cjm
{
import flash.display.MovieClip;
import ImportedClass;
public class ImportingClass extends MovieClip
{
public function ImportingClass()
{
trace(“Message”);}}}
[/as]
Good Code 1

(SubClass called ImportedClass)
[as]
package com.cjm
{
import flash.display.MovieClip;
public class ImportedClass extends MovieClip
{
public function ImportingClass()
{
trace(“Message”);}}}
ImportingClasspackage com.cjm
{
import flash.display.MovieClip;
import ImportedClass;
public class ImportingClass extends MovieClip
{
public function ImportingClass()
{
trace(“Message”);}}}
[/as]
Bad Code 2
[as]
package com.cjm
{
//import flash.display.MovieClip;
public class ImportedClass extends MovieClip
{
public function ImportingClass()
{
trace(“Message”);}}}
[/as]
Good Code 2
[as]
package com.cjm
{
import flash.display.MovieClip;
public class ImportedClass extends MovieClip
{
public function ImportingClass()
{
trace(“Message”);}}}
[/as]
Description 2
ActionScript Error #1017: The definition of base class MovieClip was not found.
This ActionScript Error is due to forgetting to import the MovieClip (or any other referenced class).

Bad Code 3
[as]
package com.cjm.sound
{
public class SoundControl extends MovieClip
[/as]
Good Code 3
[as]
package com.cjm.sound
{
import flash.display.MovieClip;
public class SoundControl extends MovieClip
[/as]

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s