Flex Red5 SyncEvent

Hello all,
I am working with a video chat application using flex and Red5. On flex side, I am using cairngorm architecture and SyncEvent on shared object for broadcasting changes made in shared objects to all clients. I feel sometimes the sync events are getting fired and sometimes they are not. So I am getting an inconsistent behavior from my application. I am using defaultObjectEncoding as AMF3.
I am not sure whether this should posted in Red5 forums or flex forums. Please excuse if I posted it in wrong place.
I will be thankful if anyone can clarify me in the following situation: The situation does not represent my application. But if I am correct in this way, I could proceed to solve my problem.
I have a client side flex application with 3 button controls
Button1 connects to Red5 as URI = rtmp://localhost:1935/Myappl. On Red5 side, I will be modifiying serveral Map attributes in application scope AppTSO. In the result handler method, upon NetConnection.Connect.Success, I am firing a cairngorm event getApplTSOSyncEvent for getting data from application scope shared object AppTSO. Corresponding command class has the following code:
var applTSO:SharedObject;       
SharedObject.defaultObjectEncoding = model.objectEncodeType; //AMF3
applTSO = SharedObject.getRemote("AppTSO", model.netConn.uri, false);
applTSO.addEventListener(SyncEvent.SYNC, doOnSync);
applTSO.connect(model.netConn);
Using sync handler method, I am monitoring each Map attribute in shared object AppTSO and populate or change data on some flex controls.
Button2 connects to Red5 in room scope as URI = rtmp://localhost:1935/Myappl/Room1001. In the result handler upon NetConnection.Connect.Success, I am firing a cairngorm event getRoomTSOSyncEvent for getting data from room scope shared object RoomTSO. Corresponding command class has the following code:
var roomTSO:SharedObject;
SharedObject.defaultObjectEncoding = model.objectEncodeType; //AMF3
roomTSO = SharedObject.getRemote("RoomTSO", model.netConnRoom.uri, false);
roomTSO.addEventListener(SyncEvent.SYNC, doOnSync);
roomTSO.connect(model.netConnRoom);
Using sync handler method, I am monitoring each Map attribute in shared object RoomTSO and populate or change data on some flex controls.
Button3 calls a Red5 method in room scope and this method make changes to Map attributes from both application scope shared object AppTSO and room scope shared object RoomTSO. From Red5 console, I could see methods are getting called correctly on server. Now on flex side should I fire getApplTSOSyncEvent and  getRoomTSOSyncEvent once again in result handler of netConn.call method? or will they be fired automatically as I am registering them on NetConnection.Connect.Success handlers? I feel sometimes they are getting fired automatically and I could get shared object
data on client and sometimes they won't.
Is it like when we connect to applicaton scope or call a method in application scope, SyncEvent on application scope shared object applTSO is fired and when we connect to room scope or call a method in room scope, SyncEvent on room scope shared object roomTSO is fired?
Please help me on this or point me to some links.
Thanks all.
roshni.

I guess you can find some information at http://www.red5chat.com

Similar Messages

  • Flex with Red5 Help.....

    Hi everybody.... I need information about using Red5 with
    Flex.... Im newbie about it. Does anybody know about tutorials or
    something that it can help me....

    I guess you can find some information at http://www.red5chat.com

  • Record Voice in Flex Using Red5

    Can any1 post me the code for recording voice in flex using
    red5 or else brief me the procedure how to record voice in flex
    using red5.....

    I think a Flash media Server could handle this.
    http://www.adobe.com/products/flashmediaserver/
    Flex does have controls for Microphone and Video capture, but
    it doesn't have any way of handling/storing that data without a
    media server as far as I know.
    Maybe someone has an alternative solution.

  • Please give me some examples of video chat with adobe flash builder 4 or adobe flex 3.5

    I'm a newbie for flex. I had a project from my college to made a video chat application using Adobe Flash Builder 4 and used Red5.  please help me, give me some examples of video chat source code, so that i may to learn it. thanks a lot friends.

    As you are starting at the beginning you may as well start with FB4. When you install FB4 you will find that its start page has links to documentation tutorials and examples through the tour-de-flex. There are some great blogs that continue to offer advice and examples, nothing beats well written examples for learning. If you are on face book there is an Adobe Flex page that is continually giving links to examples and information about e-seminars.
    And of course there is here. So jump on board and have a bit of fun.
    David

  • Flex Newbie - Communications query.

    Hi, old to programming, new to  flex, so its a lot to take in, and any pointers at what to look at are greatly helpful.
    I wish to communicate data on a server between all clients using a flash app (built in flex builder) and also to send data from a client to the other clients and to the server.
    Client to all all clients would be good for sending a update message (ie user has left application) so the other clients do not have to query the server, as long as the original client tells the server, and updates the other clients.
    What sort of communication options are available with flex?
    What areas should I be investigating, what is the most efficient way of sending data to/from a client to a server, and is it possible to do the same client to all clients (and  client to specific client).
    I can write server side stuff in php, if I know what sort of stuff I need to be dealing with flex side..
    Im trying to knock up a simple video chat room based on the flex videochat example, one to one communication works, now I need to look at communicating with multiple users, and updating them all with who has left the room, when someone enters a room, when a new room is created etc etc.
    But being new to flex, I dont know what area's to investigate.
    Familar (a little) with php, have own dedicated centos server to work on, and willing to do  lots of experimentation, if I just knew what area's to avoid and waht areas to concentrate on (with simple starter examples to build up from)
    Many thanks in advance if anyone can shed any light...

    How have you achieved one to one communication between clients?
    As per my understanding, there is no way to interact with other clients directly. You need to use server. And with servers you can use either pull or push methods. What you are looking for is push method. You may check Red5 or similar open source servers.

  • Flash to flex

    I started to figure out the red5 server and was encourage by co-workers to try it out with flex.
    For my son I wanted to remake the tron lightgrid as a starting project and to show him what I used to play in my old days. And I quickly figured out it was a snake game without the food pallets and a consistent tail. And with as3 in flash I quickly made a working prototype, and started to convert it to flex.
    Now in the end I have an error on creating the tail.
    In flash I have a library object to be duplicated each game tic, but in flex I don't have this library item and I don't know how to redeclare in the constructor for it to be duplicated each time.
    lightTrailP1 = new Array();
    lightTrailP2 = new Array();
    var firstTrailPartP1 = new TrailPart();
    var firstTrailPartP2 = new TrailPart();
    But the problem is I don't have this trailpart.
    So my question is is there anyway how I can declare the trailpart with just code?
    Thank you for your help,

    I tried making a group as you stated with a rectangle with a solid fill color. Still i'm getting the same error over and over again:
    ..\src\Tron.mxml(88):  Error: Call to a possibly undefined method TrailPart.
    http://snipt.org/wpopg
    I have put the code online, so maybe you could have insight if there maybe is another part where I am making a mistake.
    cheers,

  • Can I use Flex to push data to other PCs?

    My problem:
    I have a touchscreen(with PC) and 4 different screens (with PCs), all connected to a server. When you click on a button on the touchscreen, you load a new image on the touchscreen and 4 different contents (images/pps/movies/...) on the four screens.
    I must admit I hired some programmer to write some software 'cause "everyone" told me retrieving is no problem (obviously) but pushing data is.
    But what he did isn't working like I wanted and I'm getting nervous so I'm looking for other possibilities.
    So my question is: is this possible in flex? Can I get a solution by programing an appl. in flex?

    You may need to look at the red5 server. Check out the example applications, you should be able to modify the example for network object simultaneous
    presentation
    http://osflash.org/red5

  • Live video streaming through red5

    hi all,
    I'm working on a video Audio chat Application developed in flex, Air and red5 as media server.
    Basically the chatting will be between one-to-one user based, where one client(webUser) is going to signin from the website and selects a user from the list of online users.
    The other person is online from his desktop tool developed in air application.
    The communication between these two users is through webService. Now as soon as the Air user gets request for chat from webuser he accepts it, a chat window opens and connects to red5.
    We are streaming the live webcam video,Audio and messages through red5. we are publishing Air users video to webuser and playing webusers video to airuser. we are using the same code in both the applications for connecting and streaming but the video is playing in the webuser end for few minutes and in the air application the webuser video just appears for few seconds and stops saying NetStream.play.unpublishNotify. That is the actual problem.
    I also test with the same thing with two web application and here publishing is working at both end and both user can able to see the others video.
    So main problem is between Air and web application, the video stops in few seconds. Please let us know if there is any security restriion in AIR or any thing else which I m missing.
    Any help is appreaciated.

    Hi,
    I need show three live image from three ip cameras in one window... how can I do this?? can you help me??
    thanks

  • Screen recording in flex

    Hi,
    I am developing a whiteboard application in Flex and Action Script3. I have the following-
    There is a canvas on which the publisher can draw and that will be published to the subscribers
    The publisher can also give the webcam input and microphone input
    I have been able to do these via shared objects and net stream publish().
    Now  I want that these things are recorded in an FLV file on the server -  that is, the drawing activity on the canvas, the webcam input and the  audio on one single file which can be viewed later.
    Can someone suggest me how can I go about this?
    I  came across Screen recording VH Driver - which will emulate a webcam  and that can be use to publish to the netstream and record. But this way  I will lose my physical webcam.
    Also. I want a solution on Ubuntu as I am using the Red5 Server.
    Please suggest.

    I saw something like this on Evato Flex and AIR App. to buy for a few dollars only last week with regards to the video, and there is a Developer in NZ he had on his blog/ web site "monkey something' a whiteBoard App. all made up to use with code etc. He even won a price on 360 degree a year or so ago with it !

  • Flex application running under AIR takes a long, long time to start.

    I have a flex application which runs on a desktop under AIR. The application has an assets folder with 3,500 mp3 soundclips totalling about 50MB. The problem is, the application takes around 90 seconds to load. I'm sure that AIR is scanning the application folder and doing something with the contents because if I delete the assets folder it loads in about 5 seconds. Does anyone know why AIR/Flex would do this, and why it doesn't exhibit the same problem if I run or debug in Flexbuilder on eclipse? It's making my killer app unusable!
    Thanks
    Paulo

    Well, I've spent a bit longer looking at this now, and the problem appears to lie with my encrypted local store. The first thing that happens is for the app to read the product key from the ELS. But, it fails (for some unknown reason). So, the app seems to hang there for 90 seconds until it eventually renders the welcome screen. If I remove the assets folder it still fails to read from the ELS, but only takes a couple of seconds to start the welcome screen. This is where the scanning of the application folder seems to come into play, because if I remove the code which reads from the ELS the app starts within 2 seconds whether the asset folder is there or not.
    I think the slow startup and the scanning of the assets folder are just symptoms of a different problem, i.e. a problem with the ELS. I don't have the same problem with my development environment though - it's only when I test deploy the application.
    Thanks for your help on this problem EgorKDie. I think I should be able to resolve it once I can sort out why the ELS is being awkward.

  • Previewing an image before uploading it using the FileReference class in flex 3

    Previewing an image before uploading it using the FileReference class in flex 3 ?

    hai,
              when this code is used in my application ,i got the name of image and new frame is added each time .But image is not displayed.....
    The code  starts like this
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
                xmlns:mx="library://ns.adobe.com/flex/mx" initialize="init()"   backgroundColor="white" width="100%" height="100%">
        <fx:Script>
    <![CDATA[ 
                    import mx.controls.Alert;
                    import mx.messaging.Channel;
                    import mx.messaging.ChannelSet;
                    import mx.messaging.channels.AMFChannel;
                    import mx.rpc.events.ResultEvent;
                    import mx.controls.Image;
                    import spark.events.IndexChangeEvent;
                    import mx.managers.DragManager;
      <mx:DataGridColumn headerText="Dimension Value"  width="10" dataField="dimensionValue"/>
                                                   <mx:DataGridColumn headerText="Unit Nmae"  width="10" dataField="dimensionUnitName"/>
                                                   </mx:columns>
                                           </mx:DataGrid>
                                           <mx:Spacer width="2%"/>
                                       </mx:HDividedBox>
                                       </mx:VBox>
                   <mx:Spacer height="0"/>
                <mx:VBox width="100%">
                    <s:HGroup height="90" top="0" left="0" right="0" verticalAlign="justify" gap="10" paddingLeft="5" paddingRight="5" paddingTop="5" paddingBottom="5">
                        <s:Button id="btn_loader" top="5" bottom="24" width="100" label="load" click="loadImages()"/>
                        <s:Group width="100%">
                            <s:Group name="cl" top="0" left="0" bottom="0" width="20" mouseOver="//scroll_on(event)" mouseOut="//scroll_off(event)">
                                <s:BitmapImage source="@Embed('../assets/left.jpg')" top="0" left="0" bottom="0" right="0" fillMode="scale"/>   
                            </s:Group>
                            <s:List id="imgList" skinClass="skins.ListSkin" top="-3" left="27" right="28" bottom="10"
                                    dataProvider="{ImageCollection}" itemRenderer="Image_Render">
                                <s:layout>
                                    <s:HorizontalLayout gap="0"/>
                                </s:layout>
                            </s:List>
                            <s:Group name="cr" top="0" right="0" bottom="0" width="20" mouseOver="//scroll_on(event)" mouseOut="//scroll_off(event)">
                                <s:BitmapImage source="@Embed('../assets/right.jpg')" top="-1" left="0" bottom="0" right="0" fillMode="scale"/>
                            </s:Group>
                        </s:Group>
                    </s:HGroup>
                    <s:SkinnableContainer id="dropCanvas" top="100" left="5" right="5" bottom="5" backgroundAlpha="1.0" alpha="1.0"
                                          dragEnter="dropCanvas_dragEnterHandler(event)"
                                          dragDrop="dropCanvas_dragDropHandler(event)" contentBackgroundColor="#914E4E" backgroundColor="#F7F7F7">
                    </s:SkinnableContainer>
                </mx:VBox>
                <mx:Spacer height="5"/>
                                      </mx:VDividedBox>
        </mx:Panel>
    </mx:Canvas>

  • Is there a way of working collaboratively on a flex project with a small project group?

    Is there a way of working collaboratively on a flex project with a small project group?
    I am part of a small group of developers who wish to work on a single flex project together. Is there a way to set up flex so that the project can be developed by multiple people at the same time. I have seen one thread out on the internet about working locally and then uploading to SVn but this is not an option in this case.
    Any ideas.
    Many thanks in advance
    Dave

    I would say that rushing into development without a source-control system will cost you more in the long-run. If your organisation is serious about developing software it then it needs to invest in the necesary infrastructure, so you should get that process kicked-off as soon as possible.
    In the interim you could set-up a source control server on one developer's machine or commandeer a spare machine to use as a temporary source control server. Just make sure you have it backed-up regularly. Or you could use one of the online source control services; many will support private repositories for a small fee.

  • How to get Current Location in a Android Emulator using Flex

    Hi
    In the following code I am able to plot the Location using Latitude and Longitude but the requirement is
    in an Android Emulator on launch of the application I need google map to display the users current location,
    How can this be achieved ??? I tried to get the Latitude and Longitude of the current position using
    geoLocation class by I am not able to get that working,
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark" title="Home">
        <s:layout>
            <s:VerticalLayout />
        </s:layout>
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                import com.google.maps.LatLng;
                import com.google.maps.MapEvent;
                import com.google.maps.MapType;
                import com.google.maps.controls.PositionControl;
                import com.google.maps.controls.ZoomControl;
                import flash.sensors.Geolocation;
                private var myGeo:Geolocation;
                protected function showBtn_clickHandler(event:MouseEvent):void
                    if(Geolocation.isSupported == 'true')
                        myGeo = new Geolocation();
                        myGeo.setRequestedUpdateInterval(100);
                        myGeo.addEventListener(GeolocationEvent.UPDATE, onUpdate);
                    else
                        myTextArea.text = "Device Not Supported";
                private function onUpdate(event:GeolocationEvent):void
                    myTextArea.text += "Hi"+ "/n"+ event.latitude.toString() + "/n" +
                        event.longitude.toString();
                protected function myMap_mapevent_mapreadyHandler(event:MapEvent):void
                    myMap.setCenter(new LatLng(24,58),9,MapType.NORMAL_MAP_TYPE);
                    myMap.addControl(new ZoomControl);
                    myMap.addControl(new PositionControl);
            ]]>
        </fx:Script>
        <s:Button id="showBtn" label="Show" click="showBtn_clickHandler(event)"/>
        <s:TextArea id="myTextArea" width="100%" height="50%" />
        <maps:Map id="myMap" width="100%" height="50%"
                  xmlns:maps="com.google.maps.*"
                  sensor="true"
                  key="ABQIAAAA2Fwy6HLBheYSAWRBEZKwEhRLum8XdHegG17d4EymNgK0o7h2qRRWVBVQywiGHEiGtKahjfGW8xxc RA"
                  mapevent_mapready="myMap_mapevent_mapreadyHandler(event)"
                  url="http://www.xyz.com"/>
    </s:View>

    Geolocation isn't supported in the Emulator. You'll have to set up a test case that gives the geolocation without relying on the Emulator.

  • How to load a tif image in flex

    Hi All,
    Is it possible to load a tif image in flex. If it's possible
    anyone guide me or send me some code snippets regarding how to
    display a tif image in flex.
    Regards,
    Dharma

    "flexdharma" <[email protected]> wrote in
    message
    news:ga2d96$p8h$[email protected]..
    >
    Hi All,
    > Is it possible to load a tif image in flex. If it's
    possible anyone guide
    > me or send me some code snippets regarding how to
    display a tif image in
    > flex.
    Convert it to the much more web-friendly png format.

  • Error in executing a process for Flex compilation ....exceeds 32K...

    Hi,
    deployin my model i get the following error-message.
    "Error in executing a process for Flex compilation, Error: Branch between 64935 and 97770 around line 0 exceeds 32K span. If possible, please refactor this component.
    Error: Branch between 64935 and 97770 around line 0 exceeds 32K span."
    Do i delete a sort-element from my model it is deployed very well. So what does this message exactly mean and how can I locate where the error occurs and how can i fix that problem because i need this sort-element to be in my model.
    Thanks for your help!
    Tobias

    Hi Tobias,
    You are receiving this error due to a current limitation in the Flex server. How you can fix this is to split the iView you are currently working on into two iViews, and embed one within the other. This will decrease the size of the current iView you are receiving the error for and eliminate this problem.
    Hope this helps
    Cheers,
    Scott

Maybe you are looking for

  • Informatics PC 8.6.0 error on windows server 2008 enterprise.

    Hi, when iam trying to install INFO PC Server on windows 2008 enterprise server. It is able to configure domain but last but one step...cannot start services error. Error: Use the error below in catalina.out and node.log in the server/tomcat/logs dir

  • Is it possible to make OINV.CardName field on Sales Invoice Editable?

    Hi Forum, Sales Invoice has cardcode and cardname. Is it possible to make the cardname editable  on the form to be able to change the name on invoice. Thank you.

  • Users unable to change their interactive reports

    What tables and fields control what user can change the report? a bit of history: Due to the terrible bug that plauges apex where user created interactive reports dont get promoted with code changes when promoting from dev to prod environments, we ha

  • Using two bluetooth adapters (not devices) together in OSX?

    I was wondering if its possible to allow OSX to use two bluetooth adapters at the same time? In windows, when you plug in two adapters, it places two bluetooth icons in the system tray. It seems when I try this with OSX, the main adapter is used, and

  • CS4 Media Encoder 4.2 upgrade

    I keep getting the same upgrade automatically over and over and over. It keeps wanting me to upgrade the Media Encoder (I think that is it's name) v. 4.2. I've done it at least 8-10 times but it keeps coming and wanting to upgrade over and over. Is t