[FMX]Draw methods

I like to draw a line! I know that with the draw method

[AS]onClipEvent (enterFrame) {
this.lineStyle(2);
this.lineTo(150, 0);
}[/AS]

a line is drawn at runtime from 150 pixels with a stroke of 2 ponts.

How do I include a certain speed in this :h:

That’s not needed, Jerryscript. Flash automatically draws from the last point the Drawing API drawhead was placed at. That could have been done by moveTo, but as well by lineTo or curveTo. If it hasn’t moved it will start drawing from (0,0). So what the code actually does:

The position of the API drawhead is 0,0 at first. Then the onEnterFrame handlers draws a line from 0,0 to 0,2. The drawhead is now at 0,2. Then onEnterFrame is executed again and the drawing API now draws from 0,2 to 0,4. So it’s not like it keeps redrawing the lines from 0,0. It keeps adding new, short lines to the existing line.

for straight lines, though, it is more efficient to start over again from point 1 instead of compounding little lines on top of each other. Its easier for Flash to draw one line than it is to draw many. Given your circumstances, this may or may not be an issue.