Hi scripters!
I’ve got an problem with reading out an array, the array is filled with movieclips with each an different picture in it (php variable -an url).
Basically what i want to do is get the pressed movieclip and use another method to change the _xscale and _yscale properties of the pressed movieclip (an picture) and then pass it back to the function brillenArray.onEnterFrame to change the values of that movieclip!(if there’s a faster way… i’m open for suggestions!)
Only thing what i now get is that either all of the pictures move or none…
[AS]
brillenArray = new Array();
for (var i = 0; i<5; i++) {
if (this[‘plaatje’+i] != undefined) {
brillen = _root.brillen;
brillen.createEmptyMovieClip("image"+i, i);
brillen["image"+i].loadMovie(this["plaatje"+i]+".jpg", i);
brillenArray* = brillen["image"+i];
}
}
_root.onEnterFrame = function() {
for (var br = 0; br<=brillenArray.length; br++) {
brillenArray[br].onPress = function() {
this._xscale = 70;
this._yscale =70;
};
brillenArray[br].onRelease = function() {
};
brillenArray.onEnterFrame = function() {
}
}};
[/AS]
If i press one of the four pictures it does what i want to: THAT picture scales to 70. But how can i call this movieclip (the pressed one) from another method without using specified place in the array (like brillenArray[1])?
Hope someone knows a solution!
2 days staring on a problem, doesn’t really make my day… :crazy: