se non ho capito male il tuo problema...puoi fare in questo modo:
sullo stage hai il livello action e il livello che contiene hebi.
sul livello action metti:
codice:
_global.link = new Array("http://link1", "http://link2", "http://link3")
hebi.onEnterFrame = function () {
this._x -=2.5;
if (this._x <= -1230) {
this._x = 790.0;
}
if ((this._x > 392) & (this._x < 394)) {
duplicateMovieClip("hebi", "hebinuovo", 1)
_root.hebinuovo._x = Stage.width;
_root.hebinuovo.onEnterFrame = function () {
this._x -=2.5;
if (this._x <= -1230) {
this._x = 790.0;
}
}
}
}
a questo punto clicca 2 volte su hebi e dentro metti un bottone 'b'.
aggiungi un livello di action e scrivi:
codice:
for (i=0; i<link.length; i++) {
duplicateMovieClip("b","b"+i,i+1);
_root.hebi.b._visible = false;
_root.hebinuovo.b._visible = false;
_root.hebi["b"+i]._x = (i * _root.hebi["b"+i]._width)+ _root.hebi.b._x;
_root.hebinuovo["b"+i]._x = (i * _root.hebinuovo["b"+i]._width)+ _root.hebinuovo.b._x;
_root.hebi["b"+i].onRelease = function () {
nomeb = substring(this._name,2,1)
getURL(link[nomeb], "_blank");
}
_root.hebinuovo["b"+i].onRelease = function () {
nomeb = substring(this._name,2,1)
getURL(link[nomeb], "_blank");
}
}
in questo modo duplichi il bottone tante volte quanti sono gli elementi di dell'array link.
apero vada tutto bene