Variable number = frame number#$%@&*

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?

use this:

(on the movieclip)

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:

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

Cheers :run: