Changeset 447 for lang/javascript/jsmml
- Timestamp:
- 10/10/07 18:26:27 (6 years ago)
- Location:
- lang/javascript/jsmml/trunk
- Files:
-
- 19 added
- 1 removed
- 3 modified
-
ChangeLog (added)
-
patch (deleted)
-
src/JSMML.as (modified) (8 diffs)
-
src/JSMML.js (modified) (2 diffs)
-
src/JSMML.swf (modified) (previous)
-
vendor (added)
-
vendor/README (added)
-
vendor/flmml (added)
-
vendor/flmml/com (added)
-
vendor/flmml/com/txt_nifty (added)
-
vendor/flmml/com/txt_nifty/sketch (added)
-
vendor/flmml/com/txt_nifty/sketch/flmml (added)
-
vendor/flmml/com/txt_nifty/sketch/flmml/FlMML.as (added)
-
vendor/flmml/com/txt_nifty/sketch/flmml/MChannel.as (added)
-
vendor/flmml/com/txt_nifty/sketch/flmml/MEnvelope.as (added)
-
vendor/flmml/com/txt_nifty/sketch/flmml/MEvent.as (added)
-
vendor/flmml/com/txt_nifty/sketch/flmml/MLPFilter.as (added)
-
vendor/flmml/com/txt_nifty/sketch/flmml/MML.as (added)
-
vendor/flmml/com/txt_nifty/sketch/flmml/MOscillator.as (added)
-
vendor/flmml/com/txt_nifty/sketch/flmml/MSequencer.as (added)
-
vendor/flmml/com/txt_nifty/sketch/flmml/MSignal.as (added)
-
vendor/flmml/com/txt_nifty/sketch/flmml/MStatus.as (added)
-
vendor/flmml/com/txt_nifty/sketch/flmml/MTrack.as (added)
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/jsmml/trunk/src/JSMML.as
r396 r447 4 4 * 5 5 * The MIT Licence. 6 * 7 * require FlMML ver 0.51 6 8 */ 7 9 … … 15 17 16 18 public class JSMML extends Sprite { 19 public static const VERSION:String = '1.0.0'; 20 17 21 public var mmlPlayers:Object = {}; 18 22 … … 22 26 } 23 27 24 public const CALLBACKS:Array = ['create', 'play', 'stop' ,'pause', ' time', 'destroy'];28 public const CALLBACKS:Array = ['create', 'play', 'stop' ,'pause', 'destroy']; 25 29 public function initJS():void { 30 ExternalInterface.call('JSMML.setSWFVersion', JSMML.VERSION); 26 31 for each(var cName:String in CALLBACKS) { 27 32 ExternalInterface.addCallback('_' + cName, this[cName]); … … 52 57 } 53 58 59 /* 54 60 public function time(uNum:Number):Number { 55 61 return player(uNum).time; 56 62 } 63 */ 57 64 58 65 public function setMML(uNum:Number, mml:String):void { … … 96 103 // original code form MML#play 97 104 public function setMML(str:String):void { 98 m_string = str.toLowerCase();99 100 105 m_sequencer.disconnectAll(); 101 106 m_tracks = new Array(); … … 113 118 m_form = MOscillator.PULSE; 114 119 115 m_letter = 0;116 while(m_letter < m_string.length) {117 first(); 118 }120 preProcess(str); 121 process(); 122 123 // add ends of tracks 119 124 for(var i:int = 0; i < m_tracks.length; i++) { 120 125 m_tracks[i].recRest(384); … … 123 128 } 124 129 130 /* 125 131 public function get time():Number { 126 132 return m_sequencer.now; 127 133 } 134 */ 128 135 129 136 // MML#proxy don't override because the method call on arg. … … 141 148 m_sequencer.stop(); 142 149 } 150 143 151 } -
lang/javascript/jsmml/trunk/src/JSMML.js
r396 r447 12 12 } 13 13 })(); 14 15 JSMML.VESION = '1.0.0'; 16 JSMML.setSWFVersion = function(v) { JSMML.SWF_VERSION = v }; 17 JSMML.SWF_VERSION = 'SWF don\'t load, yet.'; 18 JSMML.toString = function() { 19 return 'JSMML VERSION: ' + JSMML.VESION + ', SWF_VERSION: ' + JSMML.SWF_VERSION; 20 }; 14 21 15 22 JSMML.swfurl = 'JSMML.swf'; … … 88 95 this.mmlPlayer._destroy(this.uNum); 89 96 delete JSMML.instances[this.uNum]; 90 }, 97 } 98 /* 99 , 91 100 time: function() { 92 101 return this.mmlPlayer._time(this.uNum); 93 102 } 103 */ 94 104 }; 95 105
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)