Hi all
I am trying to draw a progress bar using the code below. I got this from livedocs however the settings for animation and the box around it were set to show at position 0,0. I can get the box centred on the movie however I cannot get the progress bar to start or finish within the box. I starts the progress bar at x position 0 no matter what I set it to in the lineTo argument.
Where am I going wrong?
this.createTextField("loaded_txt", this.getNextHighestDepth(), 10, 10, 160, 22);
this.createEmptyMovieClip("progressBar_mc", this.getNextHighestDepth());
progressBar_mc.createEmptyMovieClip("bar_mc", progressBar_mc.getNextHighestDepth());
with (progressBar_mc.bar_mc) {
beginFill(0xFFFFFF);
moveTo(90, 120);
lineTo(270 ,120);
lineTo(270, 130);
lineTo(480, 130);
lineTo(480, 120);
endFill();
}
progressBar_mc.createEmptyMovieClip("stroke_mc", progressBar_mc.getNextHighestDepth());
with (progressBar_mc.stroke_mc) {
lineStyle(0, 0xffffff);
moveTo(90, 120);
lineTo(270 ,120);
lineTo(270, 130);
lineTo(90, 130);
lineTo(90, 120);
}
TIA
Mick
I am trying to draw a progress bar using the code below. I got this from livedocs however the settings for animation and the box around it were set to show at position 0,0. I can get the box centred on the movie however I cannot get the progress bar to start or finish within the box. I starts the progress bar at x position 0 no matter what I set it to in the lineTo argument.
Where am I going wrong?
this.createTextField("loaded_txt", this.getNextHighestDepth(), 10, 10, 160, 22);
this.createEmptyMovieClip("progressBar_mc", this.getNextHighestDepth());
progressBar_mc.createEmptyMovieClip("bar_mc", progressBar_mc.getNextHighestDepth());
with (progressBar_mc.bar_mc) {
beginFill(0xFFFFFF);
moveTo(90, 120);
lineTo(270 ,120);
lineTo(270, 130);
lineTo(480, 130);
lineTo(480, 120);
endFill();
}
progressBar_mc.createEmptyMovieClip("stroke_mc", progressBar_mc.getNextHighestDepth());
with (progressBar_mc.stroke_mc) {
lineStyle(0, 0xffffff);
moveTo(90, 120);
lineTo(270 ,120);
lineTo(270, 130);
lineTo(90, 130);
lineTo(90, 120);
}
TIA
Mick