Power Bar

O.K my brain isent working today so…

I want a power bar.

Like i press the space bar and it goes up a little but if i dont press it it will go down.
So if i get it up to half way it will go down if i dont keep pressing the space bar.

If you dont understand ill explin better.

Please please help

11 Views no replys hmm.

Come on some one got to know.

well i wont go into action scripting but basically you should do something like that:

  • a loops that checks if the spacebar is press
  • a function which will increment the size of a movie clip if the above loop is true
  • another function in the loop which will decrement the size of the MC until it has reached zero…

Sorry i really dont have free time to make a fla about it…

I am not sure I fully understand what you are trying to do, but create a bar movie clip with the registration point on the left middle.

Then apply these actions to a frame…
[AS]bar._width = 1;
_root.onEnterFrame = function() {
if (Key.isDown(Key.SPACE)) {
bar._width += 1;
if (bar._width>=100) {
bar._width = 100;
}
} else {
bar._width -= 1;
if (bar._width<=1) {
bar._width = 1;
}
}
};[/AS]

Close?