mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-09-06 10:16:28 +00:00
24 lines
404 B
Haxe
24 lines
404 B
Haxe
package io.newgrounds.swf;
|
|
|
|
import openfl.display.MovieClip;
|
|
|
|
class LoadingBar extends MovieClip {
|
|
|
|
public var bar(default, null):MovieClip;
|
|
|
|
public function new() {
|
|
super();
|
|
|
|
setProgress(0.0);
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @param value The ratio of bytes loaded to bytes total
|
|
*/
|
|
public function setProgress(value:Float):Void {
|
|
|
|
bar.gotoAndStop(1 + Std.int(value * (bar.totalFrames - 1)));
|
|
}
|
|
}
|