stijnverbruggen
%Europe/Berlin %843 %2008, 21:15
hallo,
Ik zit met het volgende probleem.
Ik probeer een filter te leggen op movieclips die ik mat actionscript aanmaak.
In elke movieclip laad ik een thumbmail in, de code die ik nu heb is de volgende
function teken_item(i,foto){
var count:Number = i + 1;
var row:Number = count % aantal_kols == 0 ? Math.floor( count / aantal_kols ) : Math.floor( count / aantal_kols ) + 1 ;
var kol:Number = count - ( (row - 1) * 4 ) ;
this["foto_" + count] = new MovieClip();
this["foto_" + count] = this.createEmptyMovieClip("thumb" + count, this.getNextHighestDepth());
this["foto_" + count]._y = -(Stage.height - 231) + y_start + ( (row - 1) * (thumb_height + thumb_gap) ) - extra;
this["foto_" + count]._x = x_start + ( (kol - 1) * (thumb_height + thumb_gap) ) ;
//trace("Row/Kol ==> "+row+"/"+kol+ "I ==>"+i+" y ==>"+this["foto_" + count]._y+" x ==>"+this["foto_" + count]._x);
loadMovie("thumb/"+foto, this["foto_" + count]);
this["foto_" + count].filters = filterArray;
}
deze function wordt opgeroepen bij elke nieuwe thumbmail.
het inladen en het plaatsen van de movieclip werkt perfect, alleen de laatste regel werkt dus langs geen kanten.
de variabele filterArray is aangemaakt en is beschikbaar in de functie.
Als ik bv zelf een movieclip op de stage zet kan ik deze functie dit aanroepen
mc_test.filters = filterArray;
en dan staan de filters op deze movieclip.
maar waarom werken die filters niet op een movieclip die ik dynamisch aanmaak ?
Ik zit met het volgende probleem.
Ik probeer een filter te leggen op movieclips die ik mat actionscript aanmaak.
In elke movieclip laad ik een thumbmail in, de code die ik nu heb is de volgende
function teken_item(i,foto){
var count:Number = i + 1;
var row:Number = count % aantal_kols == 0 ? Math.floor( count / aantal_kols ) : Math.floor( count / aantal_kols ) + 1 ;
var kol:Number = count - ( (row - 1) * 4 ) ;
this["foto_" + count] = new MovieClip();
this["foto_" + count] = this.createEmptyMovieClip("thumb" + count, this.getNextHighestDepth());
this["foto_" + count]._y = -(Stage.height - 231) + y_start + ( (row - 1) * (thumb_height + thumb_gap) ) - extra;
this["foto_" + count]._x = x_start + ( (kol - 1) * (thumb_height + thumb_gap) ) ;
//trace("Row/Kol ==> "+row+"/"+kol+ "I ==>"+i+" y ==>"+this["foto_" + count]._y+" x ==>"+this["foto_" + count]._x);
loadMovie("thumb/"+foto, this["foto_" + count]);
this["foto_" + count].filters = filterArray;
}
deze function wordt opgeroepen bij elke nieuwe thumbmail.
het inladen en het plaatsen van de movieclip werkt perfect, alleen de laatste regel werkt dus langs geen kanten.
de variabele filterArray is aangemaakt en is beschikbaar in de functie.
Als ik bv zelf een movieclip op de stage zet kan ik deze functie dit aanroepen
mc_test.filters = filterArray;
en dan staan de filters op deze movieclip.
maar waarom werken die filters niet op een movieclip die ik dynamisch aanmaak ?