User defined properties


#1

Imagine this: I’d like to have a few buttons on the screen, 1 to open facebook, the other to open instagram, etc. Instead of making 1 script for each, I’d like to do something like this:

for (let button of buttons) {
        button.on("pointerdown", (e) => {
        	Z.after(200,()=>{
        	    Z.device.launchUrl(url,option);
        	});
        });
    }

url and option being 2 fields that I added to the buttons. Currently I can do this by using tags, but I feel like tags weren’t intended to be used as custom variables but rather just to identify groups of objects that have something in common.