Custom objects allow you to define your own objects with whatever properties you need.  These objects will not appear on the screen.

Here’s how to create your own custom object with two properties, “a” and “b”:

Notice that custom objects do not have any default properties, so you need to use the “ define ” keyword for every property inside your custom type.

Defining custom object types

It’s also possible to define your own custom object types.  This can be useful to define a standard set of properties (with their default values); then when you create an instance of your custom type you don’t need to use the “ define ” keyword every time, because the property has already been define in the type.

Notice on the last three lines when setting word1 and word2 we don’t need to use the “ define ” keyword, because the property was defined in the custom object type.

Using custom object types in collections

Here we’re going to use a custom object type to quickly define a collection of our own custom objects.  One of the properties on the custom object is an image, which we can create inline by using some parenthesis to help out a little…