# Error 5007: An actionscript definition must have at least on externally

**URL:** <https://forum.kirupa.com/t/error-5007-an-actionscript-definition-must-have-at-least-on-externally/300415>\
**Category:** Uncategorized\
**Created:** [November 20, 2009, 5:35pm UTC](https://forum.kirupa.com/t/error-5007-an-actionscript-definition-must-have-at-least-on-externally/300415 "2009-11-20T17:35:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![michiel91](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@michiel91](https://forum.kirupa.com/u/michiel91)\
**Post date:** [November 20, 2009, 5:35pm UTC](https://forum.kirupa.com/t/error-5007-an-actionscript-definition-must-have-at-least-on-externally/300415/1 "2009-11-20T17:35:19Z")

</div>

Hello everybody i got a bit of a problem.

When i test my “game” i get this error and i really don’t know how to get rid of it.

The error is 5007: An ActionScript file must have at least one externally visible definition.

And it supposed to caused bij the first line of the code ( says the error compiler)

Here is my code

package {  
import flash.display.\*;

public class MatchingGame1 extends MovieClip {  
public function MatchingGame1():void {  
for(var x:uint=0;x\<6;x++) {  
for(var y:uint=0;y\<6;y++) {  
var thisCard:Card = new Card();  
thisCard.stop();  
thisCard.x = x_52+120;  
thisCard.y = y_52+45;  
addChild(thisCard);  
}  
}  
}

}  
}

Greets michiel
