Hi,
I have great difficulties with something that should be rather simpel to solve, but the problem is that I’m out of solutions to my problem.
The buttons that are created from an loop that retrieves it’s data from array’s doesn’t load the external swf, instead it gives my an ‘undefined’ output.
I tried several different array constructions found on other threads, defined them differently, but it won’t work.
Here’s what I’m working with:
[AS]buttons = [m1, m2, m3, m4, m5, m6, m7, m8];
titles = [“BOEDDHA”, “GELUKSHOEKJE”, “GEUREN”, “INTERIEUR”, “VECHTKUNST”, “PERSOONLIJK”, “SERVIES”, “VERMAAK”];
swfArray = [“products.swf”, “products1.swf”, “products2.swf”, “products3.swf”, “products4.swf”, “products5.swf”, “products6.swf”, “products7.swf”];
//
for (var i = 0; i<buttons.length and i<swfArray.length; i++) {
swfArray*.i = i;
buttons*.i = i;
buttons*._alpha = 0;
buttons*.alphaTo(100, 3, “”, i/12);
buttons*.txt.title.text = titles*;
buttons*.onRollOver = function() {
this.txt.colorTo(0xFFFFFF, 0.1, “linear”);
};
buttons*.onRollOut = function() {
this.txt.colorTo(0x4C784C, 0.3, “linear”);
this.stempel.alphaTo(0, 0.5, “Linear”);
};
buttons*.onPress = buttons*.onRelease=function () {
this.txt.colorTo(0xFFFFFF, 0.1, “linear”);
this.enabled = false;
current.txt.colorTo(0x4C784C, 0.3, “linear”)
current.enabled = true;
_global.current = this;
container.loadMovie(swfArray*);
//trace(swfArray.length);
};
}[/AS]
As you see, I made an Array of the .swf’s, put the swfArray in a loop and tried to define them to the buttons with the onRelease function.
If someone could help me please, that would be great!
Kind regards,
Baeshin