electronic ink
02-20-2003, 11:39 AM
Hey all.
I've searched long and hard to resolve this.
After using Jessie's basic array and duplicatemc to create a horizontal menu, I realized that I couldn't dynamically change the length of the text boxes (the text just cuts off).
Can anyone tell me how to achieve this?
The code so far:
Option = ["Home", "Portfolio", "About Us", "Company", "Etc."];
for (n=0; n<=Option.length-1; n++) {
name = "controller"+n;
this.duplicateMovieClip( 'controller', name, n+100);
with (this[name]) {
_x = 20+(_width*n);
_alpha = 100;
_y = 100;
}
this["controller"+n].display = Option[n];
}
stop ();
I know that in this code the MC determines the position and width, I can't workout how to make the text control it. Somehow the length of the text should dictate the width of the text box as well as the MC and its button (the MC and button will both be transparent so just the text is visilbe).
If you could help I would be most grateful.
Cheers
electronic ink
I've searched long and hard to resolve this.
After using Jessie's basic array and duplicatemc to create a horizontal menu, I realized that I couldn't dynamically change the length of the text boxes (the text just cuts off).
Can anyone tell me how to achieve this?
The code so far:
Option = ["Home", "Portfolio", "About Us", "Company", "Etc."];
for (n=0; n<=Option.length-1; n++) {
name = "controller"+n;
this.duplicateMovieClip( 'controller', name, n+100);
with (this[name]) {
_x = 20+(_width*n);
_alpha = 100;
_y = 100;
}
this["controller"+n].display = Option[n];
}
stop ();
I know that in this code the MC determines the position and width, I can't workout how to make the text control it. Somehow the length of the text should dictate the width of the text box as well as the MC and its button (the MC and button will both be transparent so just the text is visilbe).
If you could help I would be most grateful.
Cheers
electronic ink