Ignore:
Timestamp:
08/12/08 05:04:55 (5 years ago)
Author:
jeroen
Message:

added 3.17 rotator and :void returns to as3 functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/as3/com/jeroenwijering/models/HTTPModel.as

    r55 r57  
    4848 
    4949        /** Constructor; sets up the connection and display. **/ 
    50         public function HTTPModel(mod:Model) { 
     50        public function HTTPModel(mod:Model):void { 
    5151                model = mod; 
    5252                connection = new NetConnection(); 
     
    7272 
    7373        /** Catch security errors. **/ 
    74         private function errorHandler(evt:ErrorEvent) { 
     74        private function errorHandler(evt:ErrorEvent):void { 
    7575                model.sendEvent(ModelEvent.ERROR,{message:evt.text}); 
    7676        }; 
     
    9999 
    100100        /** Load content. **/ 
    101         public function load() { 
     101        public function load():void { 
    102102                if(stream.bytesLoaded != stream.bytesTotal) { 
    103103                        stream.close(); 
     
    132132 
    133133        /** Interval for the loading progress **/ 
    134         private function loadHandler() { 
     134        private function loadHandler():void { 
    135135                loaded = stream.bytesLoaded; 
    136136                var ttl = stream.bytesTotal; 
     
    143143 
    144144        /** Catch noncritical errors. **/ 
    145         private function metaHandler(evt:ErrorEvent) { 
     145        private function metaHandler(evt:ErrorEvent):void { 
    146146                model.sendEvent(ModelEvent.META,{error:evt.text}); 
    147147        }; 
     
    149149 
    150150        /** Get metadata information from netstream class. **/ 
    151         public function onData(dat:Object) { 
     151        public function onData(dat:Object):void { 
    152152                if(dat.type == 'metadata' && !h264) { 
    153153                        if(dat.width) { 
     
    181181 
    182182        /** Pause playback. **/ 
    183         public function pause() { 
     183        public function pause():void { 
    184184                clearInterval(timeinterval); 
    185185                stream.pause(); 
     
    189189 
    190190        /** Resume playing. **/ 
    191         public function play() { 
     191        public function play():void { 
    192192                stream.resume(); 
    193193                timeinterval = setInterval(timeHandler,100); 
     
    197197 
    198198        /** Change the smoothing mode. **/ 
    199         public function seek(pos:Number) { 
     199        public function seek(pos:Number):void { 
    200200                clearInterval(timeinterval); 
    201201                var off = getOffset(pos); 
     
    216216 
    217217        /** Change the smoothing mode. **/ 
    218         public function quality(qua:Boolean) { 
     218        public function quality(qua:Boolean):void { 
    219219                if(qua == true) {  
    220220                        video.smoothing = true; 
     
    228228 
    229229        /** Receive NetStream status updates. **/ 
    230         private function statusHandler(evt:NetStatusEvent) { 
     230        private function statusHandler(evt:NetStatusEvent):void { 
    231231                if(evt.info.code == "NetStream.Play.Stop") { 
    232232                        if(model.config['state'] != ModelStates.COMPLETED) {  
     
    245245 
    246246        /** Destroy the HTTP stream. **/ 
    247         public function stop() { 
     247        public function stop():void { 
    248248                clearInterval(loadinterval); 
    249249                clearInterval(timeinterval); 
     
    259259 
    260260        /** Interval for the position progress **/ 
    261         private function timeHandler() { 
     261        private function timeHandler():void { 
    262262                var bfr = Math.round(stream.bufferLength/stream.bufferTime*100); 
    263263                var pos = Math.round(stream.time*10)/10; 
     
    284284 
    285285        /** Set the volume level. **/ 
    286         public function volume(vol:Number) { 
     286        public function volume(vol:Number):void { 
    287287                transform.volume = vol/100; 
    288288                stream.soundTransform = transform; 
Note: See TracChangeset for help on using the changeset viewer.