Commiting to continue stuff at home
[swf-overlay.git] / Overlay.as
1 package {
2 import flash.utils.*;
3 import flash.events.Event;
4 import flash.display.MovieClip;
5
6 public class Overlay extends flash.display.MovieClip {
7
8 private var registry:RegistryManager;
9
10 /*
11 * After doing some science, 50ms seems to be roughly the time it takes
12 * for a request to complete and for the locking to not happen.
13 */
14 private const REFRESH_RATE = 10;
15
16 public function Overlay() {
17 this.registry = new RegistryManager(REFRESH_RATE);
18 var confParser:ConfigParserRegistry = new ConfigParserRegistry("StreamInfo.txt");
19 var confParser2:ConfigParserRegistry = new ConfigParserRegistry("StreamInfo2.txt");
20
21 this.registry.addRegistry(confParser);
22 this.registry.addRegistry(confParser2);
23
24 this.registry.addEventListener(registry.getUpdateEventType(), this.updated);
25 }
26
27 private function updated(e:Event) {
28 trace("updated");
29 trace(this.registry.getLastUpdated());
30 //var cam:Object = this.conf.get('Cam');
31 //trace(cam.MusicBoxBase);
32 }
33 }
34 }