Show
Ignore:
Timestamp:
03/06/11 17:11:53 (15 months ago)
Author:
Robin Gareus <robin@…>
Parents:
0f973c08b964db1275e3a7379cd46660a974b7dd
Children:
f50d604d32ac938942e5c715c1f9dc095c44e464
git-committer:
Robin Gareus <robin@gareus.org> / 2011-03-06T18:11:53Z+0100
Message:

sansarmes: noop, whitespace

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • flex/sansarmes/main.mxml

    r0f973c0 r6bb14a3  
    11<?xml version="1.0" encoding="utf-8"?> 
    2 <mx:Application  
    3   xmlns:mx="http://www.adobe.com/2006/mxml"  
    4     width="800" height="600"  
     2<mx:Application 
     3  xmlns:mx="http://www.adobe.com/2006/mxml" 
     4    width="800" height="600" 
    55    layout="vertical" 
    66    verticalAlign="middle" 
     
    2626            import mx.core.mx_internal; 
    2727 
    28          
     28 
    2929            private var conn:NetConnection; 
    3030            private var stream:NetStream; 
     
    3434            private var mic:Microphone; 
    3535            private var avallowed:Boolean 
    36              
     36 
    3737            private var server:String; 
    3838            private var password:String; 
     
    6262                uploadName=null; 
    6363                avallowed=false; 
    64                
     64 
    6565                br.enabled=false; 
    6666                bp.enabled=false; 
     
    7878                    return; 
    7979                } 
    80                  
     80 
    8181                mic.rate=44.10; //kHz 
    8282                mic.setSilenceLevel(0,2500); 
    8383                mic.gain=80; 
    8484                mic.setUseEchoSuppression(true); 
    85                  
     85 
    8686                cam.setMode(640,480,25); 
    8787                cam.setQuality(0, 70); 
     
    9999                myVu=new Shape(); 
    100100                myVu.graphics.clear(); 
    101                 vucanvas.rawChildren.addChild(myVu);  
     101                vucanvas.rawChildren.addChild(myVu); 
    102102            } 
    103103 
     
    125125                ; 
    126126            } 
    127              
     127 
    128128            private function asyncErrorHandler(event:AsyncErrorEvent):void { 
    129129                ; 
    130             }  
    131      
     130            } 
     131 
    132132            private function onBWDone():void { 
    133133                ; 
    134             }  
     134            } 
    135135 
    136136            private function recStarted():void { 
     
    151151                vutimer.stop(); 
    152152                myVu.graphics.clear(); 
    153             }  
    154              
     153            } 
     154 
    155155            private function netStatusHandler(event:NetStatusEvent):void { 
    156156                switch (event.info.code) { 
     
    159159                        recStarted(); 
    160160                        break; 
    161                     case "NetStream.Record.Start":                 
     161                    case "NetStream.Record.Start": 
    162162                    case "NetStream.Publish.Start": 
    163163                    case "NetStream.Record.Stop": 
     
    168168                        break; 
    169169                    case "NetConnection.Connect.Rejected": 
    170                     default:                     
     170                    default: 
    171171                        recStopped(); 
    172172                        Alert.show('warning:\n'+event.info.code, 'Alert.', mx.controls.Alert.OK); 
     
    188188                launchConnection(); 
    189189            } 
    190              
     190 
    191191            private function launchConnection():void 
    192             {   
     192            { 
    193193        //        Alert.show('uploadName: '+uploadName,'Debug.', mx.controls.Alert.OK); 
    194194                conn = new NetConnection(); 
     
    199199                conn.connect(server,username,password,uploadName); 
    200200            } 
    201              
     201 
    202202            private function startStream():void { 
    203203                stream = new NetStream(conn); 
     
    207207                vubox.visible = true; 
    208208                vutimer.start(); 
    209                 stream.publish(uploadName, "record");    
    210             } 
    211                         
     209                stream.publish(uploadName, "record"); 
     210            } 
     211 
    212212            private function stopRecording():void 
    213213            { 
     
    255255            private function playStatusHandler(event:NetStatusEvent):void { 
    256256                switch (event.info.code) { 
    257                     case "NetStream.Buffer.Flush":                 
    258                     case "NetStream.Play.Start":                 
    259                     case "NetStream.Buffer.Full":                 
    260                     case "NetStream.Buffer.Empty":                 
     257                    case "NetStream.Buffer.Flush": 
     258                    case "NetStream.Play.Start": 
     259                    case "NetStream.Buffer.Full": 
     260                    case "NetStream.Buffer.Empty": 
    261261                    case "NetStream.Seek.Notify": 
    262262                        break; 
     
    265265                        bu.enabled=false; 
    266266                        bp.enabled=false; 
    267                     case "NetStream.Play.Stop":                 
     267                    case "NetStream.Play.Stop": 
    268268                        bp.selected=false; 
    269269                        playBt(null); 
    270270                        break; 
    271                     default:                     
     271                    default: 
    272272                        //Alert.show('debug:\n'+event.info.code, 'Alert.', mx.controls.Alert.OK); 
    273273                        break; 
     
    353353                else if (vol>70) color=0xFFFF00; 
    354354                else             color=0x00FF00; 
    355                 myVu.graphics.clear();           
     355                myVu.graphics.clear(); 
    356356                myVu.graphics.beginFill(0x000000); 
    357                 myVu.graphics.drawRect(0, 0, 260, 16);             
     357                myVu.graphics.drawRect(0, 0, 260, 16); 
    358358                myVu.graphics.beginFill(color); 
    359                 myVu.graphics.drawRect(1, 1, vol*2.58, 14);             
     359                myVu.graphics.drawRect(1, 1, vol*2.58, 14); 
    360360                myVu.graphics.endFill(); 
    361361            } 
     
    375375        } 
    376376    </mx:Style> 
    377      
    378     <mx:Text styleName="center">  
     377 
     378    <mx:Text styleName="center"> 
    379379        <mx:htmlText> 
    380380            <![CDATA[<font size="22px">Sans Armes Citoyens</font>]]> 
     
    383383    <mx:Spacer height="1" /> 
    384384 
    385     <mx:Text styleName="center">  
     385    <mx:Text styleName="center"> 
    386386        <mx:htmlText> 
    387387            <![CDATA[<font size="14px">J'interprÚte l'hymne national qui me convient</font>]]> 
     
    397397                </mx:htmlText> 
    398398            </mx:Text> 
    399             <mx:Box direction="horizontal" >  
     399            <mx:Box direction="horizontal" > 
    400400                <mx:Label width="130" text="titre:" /> 
    401                 <mx:TextInput id="tt" width="240" text="pas de titre" restrict="a-zA-Z0-9, " maxChars="64"/>        
     401                <mx:TextInput id="tt" width="240" text="pas de titre" restrict="a-zA-Z0-9, " maxChars="64"/> 
    402402            </mx:Box> 
    403             <mx:Box direction="horizontal" >  
     403            <mx:Box direction="horizontal" > 
    404404                <mx:Label width="130" text="interprÚte:" /> 
    405405                <mx:TextInput id="ta" width="240" text="moi" restrict="a-zA-Z0-9, " maxChars="64"/> 
     
    410410                </mx:htmlText> 
    411411            </mx:Text> 
    412             <mx:Box direction="horizontal" >  
     412            <mx:Box direction="horizontal" > 
    413413                <mx:Label width="130" text="Adresse email:" /> 
    414414                <mx:TextInput id="te" width="240" text="@" restrict="a-zA-Z@0-9" maxChars="128"/> 
     
    440440            <mx:VideoDisplay id="video" width="340" height="240" /> 
    441441            <mx:ProgressBar width="340" mode="manual" label="%3%%" labelPlacement="center" visible="false" id="soundProgress"/> 
    442             <mx:Box direction="horizontal" visible="false" id="vubox" width="340">  
     442            <mx:Box direction="horizontal" visible="false" id="vubox" width="340"> 
    443443                <mx:Label width="70" text="Micro:" /> 
    444444                <mx:Canvas id="vucanvas" width="260" height="16"/> 
     
    465465    <mx:Spacer height="100%"/> 
    466466 
    467     <mx:Text width="100%" styleName="footer">  
     467    <mx:Text width="100%" styleName="footer"> 
    468468        <mx:htmlText> 
    469469            <![CDATA[&#169; 2011 CITU, robin@gareus.org]]>