Hi all,
I’m just a newby in As, so accept my apologies for dummy questions :cry3:
In a new site, I need to create dynamically a raw of buttons (from a min of 2 to a max of 4), in which there will be always at least an image linked to the first button, and a small text linked to the last. In a word, every gallery I need to create will have from one to three images and then a small text.
I’m trying to develop a for cycle, but there is something wrong. In the library I’ve prepared the 4 buttons, with linkagename “pulsatondo1”, “pulsatondo2”, “pulsatondo3” and “pulsatondo4”.
This is the code I’m trying to use:
var totbuttons:Number=4
var url:String=“Mc”+i
for(var i:Number=0; i<totbuttons; i++){
var mc:MovieClip=this.createEmptyMovieClip(“Mc”+i, i)
mc.attachMovie(“pulsatondo”, “pulsatondo_mc” +i, 10)
}
… but nothing happens. I think the problem is the url variable, maybe I mudt not use a string var, or maybe the èroblem is with “Mc” + i…
Could anyone give me a word of hope?
thank you in advance