Expand my Community achievements bar.

Flex 4 example

Avatar

Level 3

Hi

It seems that all the sample apps use Flex 3 (http://www.adobe.com/2006/mxml)

I'm trying to create a simple Flex 4 example but when pods are inside the ConnectSessionContainer I'm getting a white screen

after the swf loads. I do see requests and connection to lccs.

When I put the pods outside of the ConnectSessionContainer it works fine.

Do I have some basic bug or does Flex 4 require different code?

Is it important to put the pods inside the  ConnectSessionContainer?

Does the  ConnectSessionContainer intialize its children or do the pods listen to events from the  ConnectSessionContainer to start?

Please see below the code that does work when the pods are separated from the ConnectSessionContainer with the recent sdk:

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx"
               xmlns:rtc="http://ns.adobe.com/rtc">
   
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
   
    <rtc:ConnectSessionContainer width="100%" height="100%" roomURL="https://collaboration.adobelivecycle.com/myusername/testroom">
        <rtc:authenticator>
            <rtc:AdobeHSAuthenticator
                protocol="RTMFP"
                userName="tester">
            </rtc:AdobeHSAuthenticator>
        </rtc:authenticator>
    </rtc:ConnectSessionContainer>
   
    <mx:HBox width="100%" height="100%">
        <mx:VBox width="25%" height="100%">
            <rtc:Roster width="100%" height="50%"/>
            <rtc:WebCamera width="100%" height="50%"/>
        </mx:VBox>
        <rtc:SharedWhiteBoard width="75%" height="100%"/>
    </mx:HBox>
   
</s:Application>

7 Replies

Avatar

Level 4

Hi Dan,

I recommend you look at some sample apps and go from there.  You will find that all pods are inside the rtc:ConnectSessionContainer but that rtc:authenticator is outside.  Like so:

...

<rtc:AdobeHSAuthenticator id="auth" ... />

<rtc:ConnectSessionContainer id="cSession" authenticator="{auth}" roomURL="Your Room URL" width="100%" height="100%" >

     ... pods go here ...

</rtc:ConnectSessionContainer>

...

Thanks,

Nikola

Avatar

Employee

Actually embedding the authenticator as in the original example works too. The beauty of Flex!

Avatar

Former Community Member

I don't think there are any issues relating to ConnectSessionContainer and

Flex 4 - I've got several projects which work fine. That said, there's also

no requirement that you put your components inside the container either -

it's kinda handy if you want to avoid showing them until the session is

synchronized, or if you're going to have multiple sessions.

I would say that you'd likely want to convert your HBoxes to HGroups and

VBoxes to VGroups, but I don't think it should matter..

(and Raff is right, I actually prefer my authenticators inside the

container, but it should work either way).

nigel

Avatar

Former Community Member

I can second that there is no Flex 4 + ConnectSessionContainer issue.

Also, for what it's worth, the following code works fine for me (with pods inside or outside of the ConnectSessionContainer)

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

xmlns:s="library://ns.adobe.com/flex/spark"

xmlns:mx="library://ns.adobe.com/flex/mx"

xmlns:authentication="com.adobe.rtc.authentication.*"

xmlns:session="com.adobe.rtc.session.*"

xmlns:collaboration="com.adobe.rtc.collaboration.*"

xmlns:pods="com.adobe.rtc.pods.*">

<session:ConnectSessionContainer width="100%" height="100%" roomURL="...">

<session:authenticator>

<authentication:AdobeHSAuthenticator protocol="rtmfp" password="..." userName="..." />

</session:authenticator>

<mx:HBox width="100%" height="100%">

<mx:VBox width="25%" height="100%">

<pods:Roster width="100%" height="50%"/>

<pods:WebCamera width="100%" height="50%"/>

</mx:VBox>

<pods:SharedWhiteBoard width="75%" height="100%"/>

</mx:HBox>

</session:ConnectSessionContainer>

</s:Application>


So no issue with *Box components. My guess is, if you're seeing a white screen, your room connection/authentication is hanging? Sure nothing weird is happening concurrently (like someone else in the room that's causing troubles with your role, etc) ?

Avatar

Level 4

Thank you all on correcting and adding to my response.  I agree with Brian, white screen could easily point to some authentication problem. I would use the debug Flash and see if you get more information on the issue. http://forums.adobe.com/thread/786297?tstart=30

Nikola

Avatar

Level 3

In flex 4 I think you do need to wrap the authenticator otherwise the compiler will complain that it should be in the declerations part.

Now when I'm trying the example it works. I don't think it was a permissions issue because I tried to run it several times as owner/guest.

Is there a way to wrap the session with a "loading" indication?

A FAQ entry or a simple Flex 4 sample application will help future users feel confident that flex 4 is supported.

Currently we have to guess. The searching feature in this forum is not very effective although there is some valuable info here.

Thanks for all the answers.

Avatar

Former Community Member

You don't need to wrap the authenticator in a Declarations tag. It just can't be added to the display list. As it is in the example, it's not being added to the display list- it's just being assigned to the ConnectSessionContainer's "authenticator" property.

You could add an event listener to see if you were ever actually getting into the room...

<session:ConnectSessionContainer width="100%" height="100%" roomURL="..." synchronizationChange="trace( 'synchronizationChange!' )">

That's the lightest-weight way to do it. If you don't see the "synchronizationChange" message in your console you'll at least know a little more.