![]() |
|
||||||||||
|
|||||||
|
|
« Предыдущая тема | Следующая тема » |
| Опции темы | Опции просмотра |
|
![]() |
|
|||||
|
ПРОДОЛЖЕНИЕ
// STEP [1] =============== DRAW FON ======================// x_step = int(region_graf_x/n); y_step = int(region_graf_y/num_grid_y); region_draf_x = int(x_step*n); region_graf_y = int(y_step*num_grid_y); draw_pole(n, region_graf_x, region_graf_y, x_first_pos, y_first_pos); // STEP [2] ===== DRAW VERTIKAL LINE FOR GRID ===== // draw_vert_logo(n, region_graf_x, region_graf_y, x_first_pos, y_first_pos, REGION_X); // ===== DRAW MASHTAB ===== // static_mas = ""; stimul = zero_koef; while (stimul>100) {static_mas += "'"+'000'; stimul /= 1000;} x_mst = region_graf_x+x_first_pos+2; y_mst = 80; mashtab_(static_mas, x_mst, y_mst); // ===== DRAW HORISONTAL LINE FOR GRID ===== // draw_horr(n, zero_koef, num_grid_y, diapason, x_first_pos, y_first_pos, region_graf_y, REGION_Y, delenie_y, stimul, mp_num); // =--=--= DRAW ZERO LINE =--=--= \\ draw_zero(x_first_pos, y_first_pos, y_step, mp_num, diapason, mo, num_grid_y, region_graf_x); // === DRAW GRAPHICS === // graf_number = 0;// diap_x = 10;// diap_y = 0;// x_pos = region_graf_x;// y_pos = region_graf_y;// x_masht = x_grid_step; ten = 10; y_zerro = y_first_pos+y_step*mp_num; x_zerro = x_first_pos; dis_x = All_X-60; dis_y += 25; n_steping = 1; delenie_n = 1; del_step = 1; x_masht = x_grid_step; y_masht = region_graf_y/(delenie_y*num_grid_y*zero_koef/10); x0 = x_zerro; ten = 10; draw_grafik(m, n, x_masht, y_masht, x_zerro, y_zerro, delenie_y, num_grid_y, zero_koef); setProperty (preloader, _visible, "0"); } // ===== DRAW POLE ===== // function draw_grafik (m, n, x_masht, y_masht, x_zerro, y_zerro, delenie_y, num_grid_y, zero_koef) { for (r=0; r<=m-1; r++) { name = eval("instance1."+array_name+r+'head'); color = eval("instance1."+array_name+r+'c'); eval("text"+r) = name; if (menu[r] != 0){ x0 = x_zerro; y0 = y_zerro; } if (eval("instance1."+array_name+"n"+r) == "1") { vid = Number(eval("instance1."+array_name+r+'0')); if (vid == 0) { x0 = x_zerro; y0 = y_zerro; for (c=1; c<=n; c++) { y_pos = var_array[r][c]; if (y_pos*0 != 0) { y_pos = 0; } // y_masht = region_graf_y/(delenie_y*num_grid_y*zero_koef/10); x_scale = x_masht; y_scale = y_pos*y_masht; gistogr(x0, y0, y_scale, x_scale, color); x0 += x_masht; } } if (vid == 1) { x0 = x_zerro; y0 = y_zerro; for (c=1; c<=n; c++) { y_pos = var_array[r][c]; if (y_pos*0 != 0) { y_pos = 0; } // y_masht = region_graf_y/(delenie_y*num_grid_y*zero_koef/10); x_scale = x_masht; y_scale = y_pos*y_masht; gistogr(x0, y0, y_scale, x_scale, color); x0 += x_masht; } } if (vid == 2) { x0 = x_zerro; y0 = y_zerro; y_last = 0; posit_x = 0; for (c=1; c<=n; c++) { y_pos = var_array[r][c]; if (y_pos*0 != 0) { y_pos = 0; } // y_masht = region_graf_y/(delenie_y*num_grid_y*zero_koef/10); x_scale = x_masht; y_scale = (y_pos-y_last)*y_masht; gistogr(x0, y0, y_scale, x_scale, color); x0 += x_masht; posit_x++; y_last = y_pos; } } if (vid == 3) { x0 = x_zerro; y0 = y_zerro; y_last = 0; posit_x = 0; for (c=1; c<=n; c++) { y_pos = var_array[r][c]; if (y_pos*0 != 0) { y_pos = 0; } // y_masht = region_graf_y/(delenie_y*num_grid_y*zero_koef/10); x_scale = x_masht; y_scale = y_pos*y_masht; gistogr(x0, y0, y_scale, x_scale, color); x0 += x_masht; posit_x++; y_last = y_pos; } } } // if } // for } function draw_pole (n, region_graf_x, region_graf_y, x_first_pos, y_first_pos) { // region_graf_x = int(region_graf_x/n)*n; x = x_first_pos-2; y = y_first_pos-2; diap_x = region_graf_x+4; diap_y = region_graf_y+4; n_pos = 5; draw_fon(x, y, diap_x, diap_y, n_pos); x = x_first_pos-2; y = y_first_pos-2; diap_x = region_graf_x+3; diap_y = region_graf_y+3; n_pos = 1; draw_fon(x, y, diap_x, diap_y, n_pos); x = x_first_pos-1; y = y_first_pos-1; diap_x = region_graf_x+2; diap_y = region_graf_y+2; n_pos = 4; draw_fon(x, y, diap_x, diap_y, n_pos); x = x_first_pos-1; y = y_first_pos-1; diap_x = region_graf_x+1; diap_y = region_graf_y+1; n_pos = 2; draw_fon(x, y, diap_x, diap_y, n_pos); x = x_first_pos; y = y_first_pos; diap_x = region_graf_x; diap_y = region_graf_y; n_pos = 3; draw_fon(x, y, diap_x, diap_y, n_pos); } // ===== DRAW FON ===== // function draw_fon (x, y, diap_x, diap_y, n_pos) { N_layer += 1; fon_name = "fon" add N_layer; duplicateMovieClip (fon_region, fon_name, N_layer); setProperty (fon_name, _x, x); setProperty (fon_name, _y, y); setProperty (fon_name, _xscale, diap_x); setProperty (fon_name, _yscale, diap_y); tellTarget (fon_name) { gotoAndStop (n_pos);} } // ============== DRAW ALL ===================// // =--=--= SHOW ALL INFO FOR GRAFIK =--=--= \\ function draw_zero (x_first_pos, y_first_pos, y_step, mp_num, diapason, mo, num_grid_y, region_graf_x) { y_zerro = y_first_pos+y_step*mp_num; x_zerro = x_first_pos; zero_line = int((diapason-mo)/diapason*(num_grid_y-2))+1; y_zero = zero_line*y_step+y_first_pos; N_layer += 1; zerro = "z" add N_layer; duplicateMovieClip (zero, zerro, N_layer); setProperty (zerro, _rotation, 90); setProperty (zerro, _x, x_zerro); setProperty (zerro, _y, y_zerro); setProperty (zerro, _yscale, region_graf_x); } function mashtab_ (static_mas, x, y) { eval(mst).mashtab = ""; N_layer += 1; mst = "ms" add N_layer; duplicateMovieClip (mashtab, mst, N_layer); setProperty (SaveButton, _x, x); setProperty (mst, _x, x); setProperty (mst, _y, y); eval(mst).mashtab += '1 : '+1+static_mas; } function draw_horr (n, zero_koef, num_grid_y, diapason, x_first_pos, y_first_pos, region_graf_y, REGION_Y, delenie_y, stimul, mp_num) { // region_graf_x = int(region_graf_x/n)*n; power_d = zero_koef*num_grid_y; next_step = diapason/num_grid_y; REGION_Y = y_first_pos; show = mp_num*stimul*delenie_y/10; while (REGION_Y<=region_graf_y+y_first_pos) { N_layer += 1; horisontal = "horr" add N_layer; duplicateMovieClip (line_vert, horisontal, N_layer); setProperty (horisontal, _rotation, 90); setProperty (horisontal, _x, x_first_pos); setProperty (horisontal, _y, REGION_Y); setProperty (horisontal, _yscale, region_graf_x); N_layer += 1; horr_inf = "inf_hor" add N_layer; duplicateMovieClip (hr_inf, horr_inf, N_layer); setProperty (horr_inf, _x, x_first_pos-3); setProperty (horr_inf, _y, REGION_Y); REGION_Y += y_step; if (show<0.2 and show>-0.2) { show = 0; } eval(horr_inf).horr_info = show; // aser += show+';'; show -= stimul*delenie_y/10; } } function draw_vert_logo (n, region_graf_x, region_graf_y, x_first_pos, y_first_pos, REGION_X) { x_grid_step = region_graf_x/n; step_10 = 0; log_x = 1; hight_pos = 0; while (REGION_X<=region_graf_x+x_first_pos) { N_layer += 1; vertikal = "vert" add N_layer; duplicateMovieClip (line_vert, vertikal, N_layer); setProperty (vertikal, _x, REGION_X); setProperty (vertikal, _y, y_first_pos+region_graf_y+hight_pos); setProperty (vertikal, _yscale, region_graf_y+hight_pos); position_v = step_10; N_layer += 1; info = "inf" add N_layer; duplicateMovieClip (info_grafic, info, N_layer); setProperty (info, _x, REGION_X); setProperty (info, _y, y_first_pos+region_graf_y+hight_pos); if (position_v>0) { eval(info).information = eval("instance1."+array_name+'x'+position_v); } else {eval(info).information = "0"; } step_10 += 1; REGION_X += x_grid_step; x_now += 1; hight_pos += 10; if (hight_pos == 30) { hight_pos = 0; } } } function draw_line (x0, y0, Y, X, color) { N_layer += 1; new_name = "line" add N_layer; duplicateMovieClip (line_graf, new_name, N_layer); setProperty (new_name, _x, x0); setProperty (new_name, _y, y0); setProperty (new_name, _yscale, Y); setProperty (new_name, _xscale, X); tellTarget (new_name) { gotoAndStop (color); } } function draw_step (x0, y0, Y, X, color) { N_layer += 1; new_name = "line" add N_layer; duplicateMovieClip (line_step, new_name, N_layer); setProperty (new_name, _x, x0); setProperty (new_name, _y, y0); setProperty (new_name, _yscale, Y); setProperty (new_name, _xscale, X); tellTarget (new_name) { gotoAndStop (color); } } function gistogr (x0, y0, Y, X, color) { N_layer += 1; new_name = "gistogr" add N_layer; duplicateMovieClip (stolb, new_name, N_layer); setProperty (new_name, _x, x0); setProperty (new_name, _y, y0); setProperty (new_name, _yscale, Y*100); setProperty (new_name, _xscale, X*100); tellTarget (new_name) { gotoAndStop (color); } } function stolbik (x0, y0, Y, X, color) { N_layer += 1; new_name = "stolb" add N_layer; X_delta = X/10; duplicateMovieClip (stolb, new_name, N_layer); setProperty (new_name, _x, x0+(2*X_delta)); setProperty (new_name, _y, y0); setProperty (new_name, _yscale, Y*100); setProperty (new_name, _xscale, X*60); tellTarget (new_name) { gotoAndStop (color); } } function z_koef(d){ z = 1; all = d; while(all>10){ z *= 10; all = d/z; } return z; } function d_y(d){ all_d = d/z_koef(d); if (int(all_d)==1){de_y = 2;} if (int(all_d)==2 or int(all_d)==3 or int(all_d)==4){de_y = 5;} return de_y; } [/code] |
![]() |
Часовой пояс GMT +4, время: 08:58. |
|
|
« Предыдущая тема | Следующая тема » |
| Опции темы | |
| Опции просмотра | |
|
|