I’ve got a Custom Class written for generating a menu. It’s got values for things like the starting x position and y position of the menu.
So in the Custom Class I’ve got lines that read
private var startingxpos:int = 20
private var startingypos:int = 5
So, my menu starts at (20,5). Fine.
But I would like to be able to re-use this menu in all kind of instances (the whole point of the Custom Class, right?), and on other pages and projects it will need a different staring x and y positions.
Question: How do I change this to where I can give the Custom Class’ ‘startingxpos’ and ‘startingypos’ variables their values from the ActionScript panel accessed from the timeline.
I thought it would be as simple as changing them to public variables, not giving them an initial value in the Custom Class (e.g. “var startingxpost:int”), then giving the variable a value in the Actionscript Panel from the timeline (e.g. var startingxpos = 100).
This has to be really simple, right? Am I just getting something basic wrong?
Thanks