onClipEvent (load){
this._x = 10;
}
onClipEvent (enterFrame) {
this._x = this._x+5;
}
Before we said that this._x (the current symbols horizontal position) was at a point 10 pixels from the left side of the stage; now were telling Flash that each time it enters that frame, it needs to check to take the position of the symbol and add 5 pixels to it, moving it 5 pixels to the right. Thats sliding 60 pixels per second, because rather than resetting, it instead builds on itself. To simplify:
Say were working on twelve frames instead of one. Well call the position of the symbol P.
Frame 1: P=10; P=P=5, or P=10+5, so P=15.
Frame 2: P=P+5, or P=15+5, so P=20.
Frame 3: P=P+5, or P=20+5, so P=25.
Frame 4: P=P+5, or P=25+5, so P=30.
Frame 5: P=P+5, or P=30+5, so P=35.
Frame 6: P=P+5, or P=35+5, so P=40.
Frame 7: P=P+5, or P=40+5, so P=45.
Frame 8: P=P+5, or P=45+5, so P=50.
Frame 9: P=P+5, or P=50+5, so P=55.
Frame 10: P=P+5, or P=55+5, so P=60.
Frame 11: P=P+5, or P=60+5, so P=65.
Frame 12: P=P+5, or P=65+5, so P=70.
So at the start of one second, position P was 10 pixels away from the left edge of the stage; at the end of one second/12 frames, P had cycled through the ActionScript so many times that P is now 70 pixels away from the left edge of the stage.


