Форум Flasher.ru

Форум Flasher.ru (http://www.flasher.ru/forum/index.php)
-   ActionScript 1.0/2.0 (http://www.flasher.ru/forum/forumdisplay.php?f=93)
-   -   AS2.0 Проблема с графиком (http://www.flasher.ru/forum/showthread.php?t=207852)

alterago 12.05.2014 17:09

AS2.0 Проблема с графиком
 
Здравствуйте! Помогите пожалуйста! Такая проблема, мне нужно нарисовать график с осями координат, значения x (0,001;0.490;1;1.525;2;2.480;3), значения y (4.563;4.517;4.444;4.389;4.355;4.298;4.248).Если можно, то напишите код. Заранее спасибо!

dark256 12.05.2014 18:32

ActionScript 2.0 Language Reference


ActionScript classes > MovieClip > lineTo (MovieClip.lineTo method)





lineTo (MovieClip.lineTo method)
public lineTo(x:Number, y:Number) : Void

Draws a line using the current line style from the current drawing position to (x, y); the current drawing position is then set to (x, y). If the movie clip that you are drawing in contains content that was created with the Flash drawing tools, calls to lineTo() are drawn underneath the content. If you call lineTo() before any calls to the moveTo() method, the current drawing position defaults to (0,0). If any of the parameters are missing, this method fails and the current drawing position is not changed.

You can extend the methods and event handlers of the MovieClip class by creating a subclass.

Availability: ActionScript 1.0; Flash Player 6

Parameters
x:Number - An integer that indicates the horizontal position relative to the registration point of the parent movie clip.

y:Number - An integer that indicates the vertical position relative to the registration point of the parent movie clip.

Example
The following example draws a triangle with a 5-pixel, solid magenta line and a partially transparent blue fill:

Код AS1/AS2:

this.createEmptyMovieClip("triangle_mc", 1);
triangle_mc.beginFill(0x0000FF, 30);
triangle_mc.lineStyle(5, 0xFF00FF, 100);
triangle_mc.moveTo(200, 200);
triangle_mc.lineTo(300, 300);
triangle_mc.lineTo(100, 300);
triangle_mc.lineTo(200, 200);
triangle_mc.endFill();


See also
beginFill (MovieClip.beginFill method), createEmptyMovieClip (MovieClip.createEmptyMovieClip method), endFill (MovieClip.endFill method), lineStyle (MovieClip.lineStyle method), moveTo (MovieClip.moveTo method)


Часовой пояс GMT +4, время: 16:33.

Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.