Changeset 90c2f4d952815839d21c5f55b188f2f84d9847ab

Show
Ignore:
Timestamp:
11/02/09 19:58:13 (2 years ago)
Author:
Robin Gareus <robin@…>
Parents:
101487233bef68b4c66c47115e6e3c959e61b134
Children:
0afeabd69f300d36a22b3e3a695c7e04fc9d1e16
git-committer:
Robin Gareus <robin@gareus.org> / 2009-11-02T20:58:13Z+0100
Message:

FLEX updates (added Tags)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • flex/inout-av/src/main.mxml

    r0a012df r90c2f4d  
    11<?xml version="1.0" encoding="iso-8859-1"?> 
    22<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" 
    3         width="400" height="360" creationComplete="onAppInit()" > 
     3        width="400" height="380" creationComplete="onAppInit()" > 
    44        
    55    <mx:Script> 
     
    1010            private var stream:NetStream; 
    1111            private var uploadName:String; 
     12            private var baseName:String; 
    1213                        private var cam:Camera; 
    1314            private var mic:Microphone; 
     
    2122            { 
    2223                var argv:Object = Application.application.parameters; 
    23                 //uploadName="test1"; // just testing 
    24                 uploadName=argv['name']; 
     24                baseName=argv['name']; 
    2525                server="rtmp://io.citu.info/recorder"; 
    2626                username="4dc84c9279d0fcaa793eecfbc544cdbe7ea5f6e4"; 
     
    3131                if (!cam || !mic) { 
    3232                        bt.enabled=false; 
    33                         // TODO Alert.. 
     33                        tg.enabled=false; 
     34                        Alert.show('You do need a camera for live streaming.\nPlease connect one and then reload this Page.', 
     35                                   'No camera detected', mx.controls.Alert.OK); 
    3436                        return 
    3537                } 
     
    9092                                var rnd:uint = Math.floor(Math.random()*1000); 
    9193                                uploadName=now.valueOf().toString()+"-"+rnd.toString(); 
    92                 */               
     94                */ 
     95                uploadName=baseName+"-("+tg.text.replace(" ","_")+")";           
    9396                conn = new NetConnection(); 
    9497                conn.client = this; 
     
    110113            private function stopRecording():void 
    111114            { 
    112                 video.attachCamera(null); 
     115                //video.attachCamera(null); 
    113116                stream.close(); 
    114117                conn.close(); 
     
    117120                    public function camBt(event:Event):void { 
    118121                        if(bt.selected) { 
     122                                tg.enabled=false; 
    119123                                startConnection(); 
    120124                        } else { 
    121125                                stopRecording(); 
     126                            tg.enabled=true; 
    122127                        } 
    123128                    } 
     
    126131  
    127132    <mx:VideoDisplay id="video" width="340" height="280" /> 
    128     <mx:Button id="bt" toggle="true" change="camBt(event)" label="Start Camera"/> 
     133    <mx:Box direction="horizontal" >             
     134      <mx:Label text="Tags:" /> 
     135      <mx:TextInput id="tg" width="150" text="Live,Camera" restrict="a-zA-Z0-9, " maxChars="64"/> 
     136      <mx:Button id="bt" toggle="true" change="camBt(event)" label="Start Camera"/> 
     137    </mx:Box> 
     138     
    129139</mx:Application>