code: function(name, data) {
          if (typeof data === "function") throw "Scene data cannot be a function";
  
          // ---FYI---
          // this._current is the name (ID) of the scene in progress.
          // this._scenes is an object like the following:
          // {'Opening scene': {'initialize': fnA, 'uninitialize': fnB},
          //  'Another scene': {'initialize': fnC, 'uninitialize': fnD}}
  
          Crafty.trigger("SceneDestroy", {
              newScene: name
          });
          Crafty.viewport.reset();
  
          Crafty("2D").each(function() {
              if (!this.has("Persist")) this.destroy();
          });
          // uninitialize previous scene
          if (
              this._current !== null &&
              "uninitialize" in this._scenes[this._current]
          ) {
              this._scenes[this._current].uninitialize.call(this);
          }
          // initialize next scene
          var oldScene = this._current;
          this._current = name;
          Crafty.trigger("SceneChange", {
              oldScene: oldScene,
              newScene: name
          });
  
          if (this._scenes.hasOwnProperty(name)) {
              this._scenes[name].initialize.call(this, data);
          } else {
              Crafty.error('The scene "' + name + '" does not exist');
          }
  
          return;
      }
docs: /*
  #Crafty.enterScene
  @category Scenes, Stage
  @kind Method
  
  @trigger SceneChange - just before a new scene is initialized - { oldScene:String, newScene:String }
  @trigger SceneDestroy - just before the current scene is destroyed - { newScene:String  }
  
  @sign public void Crafty.enterScene(String name[, Data])
  @param name - Name of the scene to run.
  @param Data - The init function of the scene will be called with this data as its parameter.  Can be of any type other than a function.
  
  @see Crafty.defineScene
  @see Crafty.scene