# How to animating LEVEL INDICATOR in a Vessel/Tank/Drum

**URL:** https://forum.kirupa.com/t/how-to-animating-level-indicator-in-a-vessel-tank-drum/332238
**Category:** flash
**Created:** [March 18, 2014, 6:09am UTC](https://forum.kirupa.com/t/how-to-animating-level-indicator-in-a-vessel-tank-drum/332238 "2014-03-18T06:09:19Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![sangjagoan](https://avatars.discourse-cdn.com/v4/letter/s/bc79bd/32.png) [@sangjagoan](https://forum.kirupa.com/u/sangjagoan)
#### Post date: [March 18, 2014, 6:09am UTC](https://forum.kirupa.com/t/how-to-animating-level-indicator-in-a-vessel-tank-drum/332238/1 "2014-03-18T06:09:19Z")

</div>

Hi…Please help, I’m a beginner in Flash AS3.  
I want to simulate a LEVEL INDICATOR (mc\_Level) in a Vessel when opening Filling Valve (mc\_Valve). On the stage i’ve drawn in Layer ‘Tool’ frame 1: The Vessel, mcLevel and mc\_Valve. in Layer ‘Action’ frame 1, i wrote the code like these:

```auto
mc_Valve.addEventListener(MouseEvent.CLICK, actLevel);
function actLevel(e:MouseEvent):void{
  var maxLevel:Number=100;
  while(mc_Level.height<=100){
   mc_Level.height +=2;
  }
}

```

The Question; Why the above code is not showing simulation of increasing level/height in the mc\_Level ? Correction please, or give me if there’s a better code.  
Thanks.
