copy and paste the error message.
private var myVect:Vector.<MovieClip> = new Vector.<MovieClip>(5,true);
1046: Type was not found or was not a compile-time constant: MoveiClip
That is th error that appears in the compiler errors window.
(esdebon - that's exactly the same code that I posted)
that is not exactly the same code that I posted
You need add:
I didn't make it perfectly clear in the first post - but it is there and in my code. That was the first thing I look for as it often happens to me.
tick file/publish settings/swf and tick "permit debugging". take a screenshot showing the error message and attach it here.
take a sceenshot of the first 20 or 30 lines of that class showing you import statement and class name. attach it here.
Sorry won't let me insert image BUT I have enabled debugging and I get those three errors about the same MovieClip.
The error I quoted above and the following.
1120: access of undefined property MovieClip (twice)
public class as3circle extends Sprite
public var keyboard_input:keys;
public var circle_hero = new circle ;
private var energyHit:Boolean = false;
private var enemy:Enemy = new Enemy();
private var myVect:Vector.<MovieClip > = new Vector.<MovieClip > (5,true);
public function as3circle()
//Gerry hack. Make the helicopter smaller via code as I can't edit it properly
circle_hero.scaleX = .25;
circle_hero.scaleY = .25;
var keyboard_sprite = new Sprite();
keyboard_input = new keys(keyboard_sprite);
//add the enemies
for (var i:int=0; i< 5; i++)
//enemy = new Enemy ;
enemy.x = Math.random() * stage.stageWidth;
enemy.y = 0 + i * stage.stageHeight / 6;
myVect[i] = enemy;//populate the vector array with enemies. Vectors only hold one type but they are so efficient.
enemy.cacheAsBitmap = true;
that error message won't be triggered by anything you've shown.
tick file/publish settings/swf and tick "permit debugging". copy and paste the complete error message
there's another as3circle class being used by whatever fla you're using to test.
if the code you've shown has been saved to as3circle.as, try using a new directory to save your fla and your class. if you haven't saved your shown code to that file, save it and retest.
Thanks. I cut and pasted and also changed the classes to have capital letters (upper case) and now all works - God only knows why but it does in this format and it didn't before. An enigma.