Creating empty movieclip

how do i create an empty movie clip say, a rectangle, with only the outlines and no fill? the rectangle border will load at a position, say, (0,0), then when i mouseover on the other buttons, it will ease to their coordinates, but the length will change according to the text length
i wan to use it for my nav bar

wad i currently have is

onClipEvent(load) {
n = this.createEmptyMovieClip(“bar”,1);
n.beginFill(0xcccccc,100);
n.lineTo(0,5);
n.lineTo(-0.1,5);
n.lineTo(-0.1,0);
n.lineTo(0,0);
n.endFill();
n._y -= n.height;
}

i copied this source from somewhere…thanx in advance

mmmh, onClipEvent(load) can only be used on MCs. So you’d have to create an empty MC. Since you’re asking how to create an MC with ActionScript, you’d have to use the

“this.onEvent syntax”


_root.onLoad = function(){
         this.createEmptyMovieClip("bar", 1)
         with (bar){
            lineStyle(0, 0x000000, 100)
            lineTo(0,5)
            lineTo(5, 5)
            lineTo(5,0)
            lineTo(0,0)
         }
}

You can now use “bar” as the instance of a MovieClip that was manually created in Flash (w/o AS).


_root.onEnterFrame = function() {
	bar._x += 3;
};

Have fun experimenting with your menu.

thank you for answering my qns, but i wan it to change size when i rollOver on everybutton, according to the text length…assuming u noe the text length, how’d u do it?

What textfield is your text in?

scotty(-: