når jeg tracer tager den fra den seneste mc der er oprettet ud fra mit array
jeg har noget mere kode her.. jeg synes selv jeg gør det rigtigt?
function plylst_list(id_arr, x, y) { var mask_width = 200; var mask_height = 70;
var rowPad_top = -1; var rowPad_left = 2; var rowPad_right = 2; var row_width = mask_width; var row_height = 14;
var mask_txt_width = mask_width - rowPad_left - rowPad_right;
var mcMask = _root.createEmptyMovieClip("mcPlylst_rows_mask", _root.getNextHighestDepth()); drw_rect(mcMask, x, y, mask_width, mask_height);
var mcRows = _root.createEmptyMovieClip("mcPlylst_rows", _root.getNextHighestDepth()); mcRows.setMask(mcMask);
for(var i = 0; i < id_arr.length; i++) { var mcRow = mcRows.createEmptyMovieClip("mcPlylst_row"+id_arr[i], mcRows.getNextHighestDepth()); mcRow._alpha = 0; drw_rect(mcRow, x, y, row_width, row_height, "004E98");
var mcTxt_mask = mcRows.createEmptyMovieClip("mcPlylst_txt_mask"+id_arr[i], mcRows.getNextHighestDepth()); drw_rect(mcTxt_mask, x+rowPad_left, y, mask_txt_width, row_height);
var mcTxt = mcRows.createEmptyMovieClip("mcPlylst_txt"+id_arr[i], mcRows.getNextHighestDepth()); mcTxt.setMask(mcTxt_mask);
eller her er alt det kode som skal bruges til funktionen :)
with(txtFormat_plylst = new TextFormat()) { size = 9; font = "tahoma"; color = 0xBFBFBF; }
function drw_rect(mc, x, y, width, height, bg_color, stroke, sk_color) { mc.lineStyle(stroke, "0x"+sk_color); mc.beginFill("0x"+bg_color); mc.moveTo(x, y); mc.lineTo(x + width, y); mc.lineTo(x + width, y + height); mc.lineTo(x, y + height); mc.lineTo(x, y); mc.endFill(); }
//---------------------------------------------------------------------------------------------- // plylst //---------------------------------------------------------------------------------------------- var plylst_id_arr = [0,1,2,3]; var plylst_artist_arr = ["Kim Larsen der er et langt ord som fylder ret så meget i det hele taget","Frank g Homo","he","asdf","33","123"]; var plylst_title_arr = []; var plylst_time_arr = []; var plylst_label_arr = []; var plylst_date_arr = [];
function plylst_list(id_arr, x, y) { var mask_width = 200; var mask_height = 70;
var rowPad_top = -1; var rowPad_left = 2; var rowPad_right = 2; var row_width = mask_width; var row_height = 14;
var mask_txt_width = mask_width - rowPad_left - rowPad_right;
var mcMask = _root.createEmptyMovieClip("mcPlylst_rows_mask", _root.getNextHighestDepth()); drw_rect(mcMask, x, y, mask_width, mask_height);
var mcRows = _root.createEmptyMovieClip("mcPlylst_rows", _root.getNextHighestDepth()); mcRows.setMask(mcMask);
for(var i = 0; i < id_arr.length; i++) { var mcRow = mcRows.createEmptyMovieClip("mcPlylst_row"+id_arr[i], mcRows.getNextHighestDepth()); mcRow._alpha = 0; drw_rect(mcRow, x, y, row_width, row_height, "004E98");
var mcTxt_mask = mcRows.createEmptyMovieClip("mcPlylst_txt_mask"+id_arr[i], mcRows.getNextHighestDepth()); drw_rect(mcTxt_mask, x+rowPad_left, y, mask_txt_width, row_height);
var mcTxt = mcRows.createEmptyMovieClip("mcPlylst_txt"+id_arr[i], mcRows.getNextHighestDepth()); mcTxt.setMask(mcTxt_mask);
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.