Hi there!
What I am trying to do is write a class that could function on the x axis, or y axis, so when an instance of the class is called, the axis is specified. For example:
Scroll:ScrollFunction = new ScrollFunction(_x, MC);
class ScrollFunction {
function ScrollFunction(axis, targetMC) {
targetMC.axis = 25;
}
}
That’s a very simplified version, but you get the idea. This won’t work though because although Flash recognizes ‘axis’ as being equal to ‘_x’, it does not recognize ‘axis’ as a property.
All I want to know is if it is possible or not. I could, of course use an if statement, but that would mean I would have to have to write the function twice, once for each axis, which is what I want to avoid.
Any help is great! Thanks!