Can someone explain to me why this sort of, but doesn’t work?
I’m just creating a group of buttons using imported pictures without having anything in the library.
Here’s the code I’m using:
[AS]clipArray = [];
posArray = [];
for (var k = 0; k<3; k++) {
var movie = “button”+k+"_mc";
//myclip = attachMovie(“mc”+k, “mc1”+k, k);
createEmptyMovieClip([movie], k);
myclip = loadMovie(“pic”+k+“s.jpg”, [movie]);
myclip._y = 100;
myclip._x = 50+myclip._width*k;
clipArray.push(myclip);
countArray.push(k);
posArray.push(myclip._x);
myclip.onRelease = dostuff;
trace(movie);
}
[/AS]
with instances in the library called mc1, mc2 etc and using the //'d out attachMovie line (and //'ing out the loadMovie line) it works perfectly, but I’d rather not have Library instances if possible.
Also as it is, the array building is worthless (a trace(clipArray) will return undefined) and the pic’s in the mc’s are just on top of one another and don’t possess an onRelease state.
Thanks,
PWB.