Description

Create an element

Usage

Parameters

  • name {String} optional

    (optional)

  • width {Integer} optional

    (optional)

  • height {Integer} optional

    (optional)

Example

In the method "ready" in the scene class :

var el = this.createElement();

--

var el = this.createElement("foo");

--

var el = this.createElement(100, 100);

-- Create two elements :

var els = this.createElement(["foo", "bar"]);
stage.append(els.foo, els.bar);

Discussion