Skip to content

Instantly share code, notes, and snippets.

@jbuda
Created March 19, 2013 13:41
Show Gist options
  • Save jbuda/5196181 to your computer and use it in GitHub Desktop.
Save jbuda/5196181 to your computer and use it in GitHub Desktop.
ProgressBArManager.as
package com.progressbar.managers {
import flash.events.*;
[Bindable]
public class ProgressBarManager extends EventDispatcher {
private var _bytesLoaded:int;
private var _bytesTotal:int;
[Bindable (event="progressUpdate")]
public function get bytesLoaded():int {
return _bytesLoaded;
}
[Bindable (event="progressUpdate")]
public function get bytesTotal():int {
return _bytesTotal;
}
public function ProgressBarManager() { }
public function increaseProgressBar():void {
_bytesLoaded += 1;
_bytesTotal = 30;
dispatchEvent(new Event('progressUpdate'));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment