Hello all. So far these forums have been very useful to me while I try to learn the basics of AS so I’m hoping that someone out there can help me out again.
Ina nutshell I’m trying to make an object move across the screen from one side to the other and stop. I know how to do this using a straight-forward enterFrame function so it runs when I publish the FLA but I don’t seem to be able to apply my code to a button press. Can anybody help me?
Here’s the code I’ve been trying to adapt.
m_Box.onEnterFrame = function() {
if (this._x<500) {
this._x += 20;
} else {
this._x = 500;
delete this.onEnterFrame;
}
};