# Variable number = frame number#$%@&\*

**URL:** https://forum.kirupa.com/t/variable-number-frame-number/12682
**Category:** flash
**Created:** [February 3, 2003, 2:33pm UTC](https://forum.kirupa.com/t/variable-number-frame-number/12682 "2003-02-03T14:33:40Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Halil](https://avatars.discourse-cdn.com/v4/letter/h/7ea924/32.png) [@Halil](https://forum.kirupa.com/u/Halil)
#### Post date: [February 3, 2003, 2:33pm UTC](https://forum.kirupa.com/t/variable-number-frame-number/12682/1 "2003-02-03T14:33:40Z")

</div>

I have a movie Clip called “percentage bar” and a variable text box called “percentage”.  
Now I get a number from VB and this number is = to the value of ”percentage” (my variable txt box).  
The Movie Clip has a 100 frames… here it comes I need to have whatever the variable number (“percentage”) is to determine which frame the movie clip (“percentage bar”) is standing on.

This has to be possible, don’t it?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 3, 2003, 3:01pm UTC](https://forum.kirupa.com/t/variable-number-frame-number/12682/2 "2003-02-03T15:01:46Z")

</div>

use this:

(on the movieclip)

```auto
onClipEvent (enterFrame) {
	(_root.percentage++) ? this.nextFrame() : this.stop();
}

```

that will create an enter frame action (updates on frame rate bases) that will tell the movie clip every time that the percentage increases to the movieclip go to the next frame, if percentage doesn´t increases it will stop.

it could be written in this way too:

```auto
onClipEvent (enterFrame) {
	if (_root.percentage++) {
		this.nextFrame();
	} else {
		this.stop();
	}
}

```

Cheers :run:
