Skip to main content
Known Participant
March 10, 2017
Question

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

  • March 10, 2017
  • 4 replies
  • 1696 views

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;

  }

    This topic has been closed for replies.

    4 replies

    rezun8
    Inspiring
    April 3, 2017
    Known Participant
    April 3, 2017

    This has been answered from a different post that i have made.

    Known Participant
    March 28, 2017

    This is in Adobe Flash Professional CS 5.5

    John T Smith
    Community Expert
    Community Expert
    March 10, 2017

    Please post the name of the program you use so a Moderator may move this message

    A program would be Photoshop or Dreamweaver or Muse or Premiere Pro or ???