help!!!
i was putting in a new scroll function in my movies when something weird happened. i have this thumb gallery from kirupa which i modified a bit. every file in where had putten the new scroll the colormatrix wont work anymore. i replaced the new code with old code again, but it still doesnt work
here’s my code
import flash.filters.ColorMatrixFilter;
_global.myAgenda = this;
var agendaOpen = "AAN";
url = "http://www.mambocuracao.com/v2/agenda/thumbs/";
#include "../mc_tween2.as"
/////////////////////////////
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
thumbnails = [];
targetlist = [];
myAgenda.total = xmlNode.childNodes.length;
var totalT = total;
for (i=0; i<total; i++) {
image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
description* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
thumbnails* = xmlNode.childNodes*.childNodes[2].firstChild.nodeValue;
targetlist* = xmlNode.childNodes*.childNodes[3].firstChild.nodeValue;
thumbnails_fn(i);
}
} else {
beeldenladen_mc.beeldenladen_txt.text = "[ error laden XML ]";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("http://www.mambocuracao.com/v2/AGENDA/agenda_thumbs.xml");
/////////////////////////////////////
this.p = 0;
loadedThumbs = 0;
loadedthumbs_txt.text = "geladen "+loadedThumbs+"/"+ totalT;
this.onEnterFrame = function() {
filesize = _root.body_mc.getBytesTotal();
loaded = _root.body_mc.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
if (_root.body_mc._alpha<100) {
_root.body_mc._alpha += 10;
}
}
};
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
_root.body_mc._alpha = 0;
_root.body_mc.loadMovie(image[p], 1);
picture_num();
}
}
}
function prevImage() {
if (p>0) {
p--;
_root.body_mc._alpha = 0;
_root.body_mc.loadMovie(image[p], 1);
picture_num();
}
}
function firstImage() {
if (loaded2 == filesize2){
_root.body_mc.loadMovie(image[0],1);
}
if (loaded == filesize) {
_root.body_mc._alpha = 0;
_root.body_mc.loadMovie(image[0], 1);
picture_num();
_root.film = targetlist[0];
}
}
function picture_num() {
current_pos = p+0;
pos_txt.text = current_pos+" / "+total;
}
function thumbNailScroller() {
// thumbnail code!
this.createEmptyMovieClip("tscroller_mc", 1000);
scroll_speed = 10;
tscroller_mc.onEnterFrame = function() {
if ((_xmouse>=thumbnail_mc._x) && (_xmouse<=thumbnail_mc._x+thumbnail_mc._width)) {
if ((_ymouse>=(hitright_mc._y-40)) && (thumbnail_mc.hitTest(hitright_mc))) {
thumbnail_mc._y -= scroll_speed;
} else if ((_ymouse<=(hitleft_mc._y+40)) && (thumbnail_mc.hitTest(hitleft_mc))) {
thumbnail_mc._y += scroll_speed;
}
} else {
delete tscroller_mc.onEnterFrame;
}
};
}
//beeldenladen_mc.play();
function thumbnails_fn(k) {
thumbnail_mc._alpha = 0;
loaded_counter=0;
beeldenladen_mc.beeldenladen_txt.text = "[ "+loaded_counter+"/"+ myAgenda.total+" items geladen ]";
total_thumbs = myAgenda.total;
thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._y = hitleft_mc._y+(target_mc._height+5)*k;
target_mc.pictureValue = k;
target_mc.onRelease = function() {
if ( agendaOpen == "AAN"){
p = this.pictureValue-1;
nextImage();
_root.events = targetlist[p];
}
};
loaded_counter++;
beeldenladen_mc.beeldenladen_txt.text = "[ "+loaded_counter+"/"+ myAgenda.total+" items geladen ]";
if (loaded_counter == myAgenda.total){
beeldenladen_mc.alphaTo(0, .2, "easeOutcubic");
thumbnail_mc.alphaTo(100, .2, "easeOutcubic");
}
var matrix:Array = new Array(0.309,0.609,0.082,0,0,0.309,0.609,0.082,0,0,0.309,0.609,0.082,0,0,0,0,0,1,0);
var cmFilter:ColorMatrixFilter = new ColorMatrixFilter(matrix);
target_mc.filters = [cmFilter];
target_mc._alpha=70;
// DIT ZET DE THUMB !)PX NAAR LINKS
thumbnail_mc._x = -10;
target_mc.onRollOver = function() {
if ( agendaOpen == "AAN"){
_root.my_sound.start();
_root.easeIn();
_root.getYpos2();
var matrix:Array = new Array(1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0);
var cmFilter:ColorMatrixFilter = new ColorMatrixFilter(matrix);
this.filters = [cmFilter];
this._alpha = 100;
this.xSlideTo(10, .2, "easeOutcubic");
thumbNailScroller();
}
};
target_mc.onRollOut = function() {
_root.easeOut();
var matrix:Array = new Array(0.309,0.609,0.082,0,0,0.309,0.609,0.082,0,0,0.309,0.609,0.082,0,0,0,0,0,1,0);
var cmFilter:ColorMatrixFilter = new ColorMatrixFilter(matrix);
this.filters = [cmFilter];
this._alpha = 70;
this.xSlideTo(0, .2, "easeOutcubic");
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(url+thumbnails[k], "thumbnail_mc.t"+k);
}
// REGELT DAT HET MASKER MEE SCALED
function scaleMe(){
myAgenda.b = Stage.height;
// SNAP NIET DIE 200, IS DE VANAF DE ONDERKANT
myAgenda.a = Stage.height-260;
myAgenda.mask_mc._height = a;
myAgenda.y_mc._y = a;
//mask_mc._y = 10;
// ZET DE SCROLL HIT 50PX VAN ONDER
myAgenda.grad_mc._y = a;
myAgenda.hitright_mc._y = a+hitright_mc._height*2;
//mask_mc._y = Stage.height -20;
//mask_mc.align = "LT"-20 ;
};
var myListener = new Object();
myListener.onResize = function (){
scaleMe();
};
Stage.addListener(myListener);
scaleMe();
stop();
the weird thing is if i change this line of code
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(url+thumbnails[k], "thumbnail_mc.t"+k);
}
to this
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip("thumbs/"+thumbnails[k], "thumbnail_mc.t"+k);
}
the var url which i use worked before i put in the new scroll function. I dont understand it anymore