hi! im trying to do a dinamic link for my dinamic thumbs gallery. But i dont know how to propagate it .
here is my function for my show next button
rows = 3;
itemheight = 80;
itemx = 5;
//
starty = (rows*itemheight)/-2;
topb = _height/-2;
bottomb = _height/2;
easingstyle = "my_easing_here";
easingduration = .5;
//
clips = [];
items = [];
mc = [];
//
init();
//
function init() {
currentid = 0;
content_mc.setMask(mask_mc);
var sty = starty;
for (var i = 0; i<rows; i++, sty += itemheight) {
clips.push(content_mc.attachMovie("ListBoxItem_mc", "item"+i, i, {_x:itemx, _y:sty}));
}
}
//
function addItem(label, data) {
if (items.length<rows) {
clips[items.length].resize_btn.onRelease = function() {
_root.container.profile.loadMovie("profile/profile"+[data-1]+".swf");
};
clips[items.length].holder.attachMovie("foto"+[items.length]+"_mc", "foto"+[items.length], [items.length], {_x:28, _y:20});
//aki tambien
clips[items.length].txt_mc.label_txt.text = label;
clips[items.length].id = items.length;
}
items.push({label:label, data:data});
}
function shownext() {
if (currentid+1>items.length-rows) {
return;
}
function reorder() {
var sty = starty;
var i;
for (i=0; i<rows; i++, sty += itemheight) {
if (i<rows-1) {
clips*._y = sty;
} else {
clips*._y = bottomb;
clips*.tween("_y", sty, easingduration, easingstyle);
}
var currentd = items[currentid+i].data;
clips*.resize_btn.onRelease = function() {
//HERE IS MY PROBLEM ! I CANT GET A DINAMIC VALUE THAN PROPAGATE IN 3 ROWS
_root.container.profile.loadMovie("profile/profile"+[currentid+i]+".swf");
};
clips*.txt_mc.label_txt.text = items[currentid+i].label;
clips*.holder.attachMovie("foto"+[currentid+i]+"_mc", "foto"+[currentid+i], [currentid+i], {_x:28, _y:20});
clips*.id = currentid;
}
}
currentid++;
clips[0].tween("_y", topb-itemheight, easingduration, easingstyle, 0, reorder);
var sty = starty;
for (var i = 1; i<rows; i++, sty += itemheight) {
clips*.tween("_y", sty, easingduration, easingstyle);
}
}
function showprev() {
if (currentid-1<0) {
return;
}
function reorder() {
var sty = starty;
var i;
for (i=0; i<rows; i++, sty += itemheight) {
if (i>0) {
clips*._y = sty;
} else {
clips*._y = topb;
clips*.tween("_y", sty, easingduration, easingstyle);
}
var currentd = items[currentid+i].data;
//HERE IS MY PROBLEM ! I CANT GET A DINAMIC VALUE THAN PROPAGATE IN 3 ROWS
clips*.resize_btn.onRelease = function() {
_root.container.profile.loadMovie("profile/profile"+[currentid+i]+".swf");
};
clips*.txt_mc.label_txt.text = items[currentid+i].label;
clips*.holder.attachMovie("foto"+[currentid+i]+"_mc", "foto"+[currentid+i], [currentid+i], {_x:28, _y:20});
clips*.id = currentid;
}
}
currentid--;
clips[rows-1].tween("_y", bottomb, easingduration, easingstyle, 0, reorder);
var sty = starty+itemheight;
for (var i = 0; i<rows-1; i++, sty += itemheight) {
clips*.tween("_y", sty, easingduration, easingstyle);
}
}
[COLOR=#000000][/COLOR]