Using Classes

I tried doing this with a function (see below), but realized that doesn’t work so thought I should use a class. My question is can a class reside in the document being used or do I have to write a file and import it? I’m trying to create a projector file with no external links.

I’m trying to set something up where I have one button that can be shared for ten different actions all with different results (loads different info on the stage).

example buttons:
product 1
product 2
product 3
—>> there’d be a sub menu on the stage that those buttons load call “sub menu” I want that sub menu button to load info on the current product selected. If that makes sense.