Quantcast
Channel: Adobe Community : Discussion List - Using Flash Builder
Viewing all articles
Browse latest Browse all 1802

TypeError: Error #1007: Instantiation attempted on a non-constructor. at MainGameFile/gameLoop()

$
0
0

Any help? My boxMC is inside of my background(WorldMC) but I get an error saying

 

TypeError: Error #1007: Instantiation attempted on a non-constructor.

  at MainGameFile/gameLoop()

 

This is where the code is giving me trouble:

 

  //-----------------------------------

  // -----Box Spawning------------

  //------------------------------------

  //only spawn a box if there are less tan 100 already on screen

 

  {

  // Make a new instance of the box class

  var bx = new WorldMC.boxMC();

  // add the ship to the display list

  addChild(bx);

  //position and rotate the Box

  WorldMC.bx.x = Math.random() * stage.stageWidth;

  WorldMC.bx.y = Math.random() * stage.stageHeight;

  WorldMC.bx.rotation = 40;

  }


Viewing all articles
Browse latest Browse all 1802

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>