root/lang/actionscript/flmml/trunk/src/com/txt_nifty/sketch/flmml/FlMML.as @ 1532

Revision 1532, 0.8 kB (checked in by tekisuke, 6 years ago)

lang/actionscript/flmml/:
addEventListenerの使い方が間違ってるのかもしれないので書き方を変えてみる。

Line 
1package com.txt_nifty.sketch.flmml {
2    import mx.core.UIComponent;
3
4    public class FlMML extends UIComponent {
5        private var m_mml:MML;
6
7        public function FlMML() {
8            m_mml = new MML();
9            var self:FlMML = this;
10            m_mml.addEventListener(MMLEvent.COMPILE_COMPLETE, function(e:MMLEvent):void {
11                    self.dispatchEvent(new MMLEvent(MMLEvent.COMPILE_COMPLETE));
12                });
13        }
14
15        public function play(mml:String):void {
16            m_mml.play(mml);
17        }
18
19        public function stop():void {
20            m_mml.stop();
21        }
22
23        public function setMasterVolume(vol:int):void {
24            m_mml.setMasterVolume(vol);
25        }
26
27        public function getWarnings():String {
28            return m_mml.getWarnings();
29        }
30    }
31}
Note: See TracBrowser for help on using the browser.