Alternatively, you can first create a constructor function and then instantiate an object invoking that function in conjunction with the new operator.
Als alternatief kunt u eerst een constructorfunctie maken en vervolgens een object oproepen die de functie in combinatie met de nieuwe operator invult.
First, create the class by defining a constructor function for the class, as follows
This restriction applies when you create an object and its properties with a constructor function (as we did previously with the Car object type) and when you define individual properties explicitly (for example, myCar.color = "red").
Deze beperking is van toepassing wanneer u een object en zijn eigenschappen maakt met een constructorfunctie(zoals eerder met het Car-object type) en wanneer u afzonderlijke eigenschappen expliciet definieert(bijvoorbeeld, myCar.color = "red").
To create a class in ActionScript 1.0, you define a constructor function for that class.
Als u een klasse in ActionScript 1.0 wilt maken, definieert u een constructorfunctie voor die klasse.
In addition to creating objects using a constructor function, you can create objects using an object initializer.
This method can be very useful, because it allows you to choose the prototype object for the object you want to create, without having to define a constructor function.
Deze methode kan erg handig zijn, omdat u het prototype object voor het object kunt maken dat u wilt maken zonder dat u een constructor function.type moet definiëren.
Conținut posibil inadecvat
Exemplele au rolul de a te ajuta să traduci cuvinte sau expresii corect si adaptat la context. Nu sunt selectate sau validate manual, așadar pot conține termeni inadecvați. Te rugăm să raportezi exemplele pe care le consideri inadecvate. Traducerile vulgare sau colocviale sunt în general marcate cu roșu sau cu portocaliu.
Nici un rezultat pentru acest sens.
Sinonime și analogii pentru "a constructor function" în limba Română