Skip to main content
March 3, 2009
Question

error : Severity and Description Path Resource Location Creation Time Id

  • March 3, 2009
  • 66 replies
  • 11254 views

i have this error :
Severity and Description Path Resource Location Creation Time Id
invalid character or markup found in script block. Try surrounding your code with a CDATA block. essai/src essai.mxml Unknown 1236103965593 182


my source is attach code


Many thanks for your help , 


Lionceau,

    This topic has been closed for replies.

    66 replies

    March 4, 2009
    here i declare this <rtc:WebcamPublisher id="webCamPub" width="10" height="5"/>

    Lionceau
    Participating Frequently
    March 4, 2009
    Lionceau,
    to repeat, what are the data types of the webcamPublisher property and of your webCamPub object? Once you see what data types they have, you will probably see why the mismatch is occurring.

    For the first of these you must look at the documentation for the WebcamSubscriber object. I don't know where you have found this, but you should know where the documentation is (if you don't, your chances of using it successfully are slim).

    I can't see anywhere that you have declared the webCamPub variable. You must declare the variable before you can use it.
    Richard
    March 4, 2009
    <rtc:ConnectSessionContainer id="sessionManager"
    width="500" height="400" backgroundColor="#FFFFFF"
    authenticator="{identificator}" autoLogin="false"
    roomURL=" http://connectnow.acrobat.com/lionceau01/essai"
    synchronizationChange="onSynchro( event )"
    />

    <!-- PODS -->



    <!-- pour geer le son et la video -->
    <mx:VBox width="60%" height="100%" horizontalAlign="center">
    <rtc:WebCamera id="webcampub" width="100%" height="100%"
    />

    </mx:VBox>















    <!-- only listen to the subscribers we have selected -->

    <!-- en lever ca pour plus erreur -->
    <!-- -->

    <collaboration:AudioSubscriber id="audioSub" publisherIDs="{audioIds}"/>


    <mx:Tile id="camTiles"
    direction="horizontal"
    height="100%"
    width="100%"
    alpha="0"
    horizontalScrollPolicy="off"
    verticalScrollPolicy="off"
    creationComplete="onCreationComplete()"
    horizontalGap="10" verticalGap="10">

    <mx:VBox width="100%" height="100%" id="clickedContainer"/>


    <mx:Repeater id="rp" dataProvider="{selectedUsers}">

    <rtc:WebcamPublisher id="webCamPub" width="10" height="5"/>


    <mx:Canvas id="rs" width="100%" height="100%"
    minHeight="200" minWidth="200"
    backgroundAlpha=".5"
    backgroundColor="gray"
    cornerRadius="12"
    borderStyle="solid"
    horizontalScrollPolicy="off" verticalScrollPolicy="off">


    <collaboration:WebcamSubscriber webcamPublisher="{webCamPub}"
    width="100%" height="100%"
    publisherIDs="{[rp.currentItem.userID]}" click="onClick(event)"
    userBooted="onBooted(event)" streamChange="onCameraPause(event)">
    </collaboration:WebcamSubscriber>





    </mx:Canvas>




    <mx:VBox width="100%" height="15%" horizontalAlign="center" horizontalGap="5">
    <rtc:WebcamSubscriber webcamPublisher="{webCamPub}" publisherIDs="{[rp.currentItem.userID]}" click="onClick(event)" userBooted="onBooted(event)" streamChange="onCameraPause(event)"/>
    <mx:Button label="Start" click="onBtnClick(event)" visible="{rp.currentItem.userID==cSession.userManager.myUserID}" />
    </mx:VBox>
    </mx:Repeater>
    <!-- -->
    </mx:Tile>

    <!-- -->
    <!-- end only listen (thanks adobe ) -->

    <!-- fin de ca -->









    <mx:VBox width="40%" height="90%" right="0">
    <mx:Button label="Déconnexion" click="logout()" />

    <!-- scroll bar pourle volume -->
    <mx:VBox paddingLeft="15" width="10%">


    <mx:Label text="Gain" fontWeight="bold" />
    <mx:HSlider id="gainSlider" minimum="0" maximum="100" width="90%" value="{audio.gain}" labels="[0,50,100]" change="onGainChange(event)" />
    </mx:VBox>


    <mx:VBox paddingLeft="15" fontWeight="bold" width="70%">
    <mx:Label text="UseEchoSuppression"/>
    <mx:RadioButtonGroup id="echoGroup" itemClick="onItemClick(event)" />
    <mx:RadioButton label="Yes" selected="{audio.useEchoSuppression}" groupName="echoGroup" />
    <mx:RadioButton label="No" selected="{!audio.useEchoSuppression}" groupName="echoGroup"/>
    </mx:VBox>

    <rtc:AudioPublisher id="audio" height="0" />
    <rtc:AudioSubscriber/>


    <mx:HBox width="100%" horizontalAlign="center">
    <mx:Button id="btn" label="Start My Audio" click="onAudioClick(event)" toggle="true" />
    </mx:HBox>



    <mx:Button label="AudioButt"
    toggle="true" id="audioButt" color="#000000"
    click="(audioButt.selected) ? audio.publish() : audio.stop()"
    />



    <!--
    <mx:Button id="btnTalk"
    label="{btnTalk.selected ? 'Stop Talking':'Start Talking'}"
    toggle="true"
    click="{btnTalk.selected ? audio.publish():audio.close()}"
    />
    -->



    <!-- only listen to the subscribers we have selected -->



    <!-- ____________________________________________________________________________________________________________________________ -->
    <!-- fin pour geer le son et la video -->
    <rtc:Note id="notes" width="100%" height="40%" />

    <!-- ligne à finir <rtc:SharedWhiteBoard id="essai" width="50%" height="50%" /> -->
    <rtc:SimpleChat id="chat" width="100%" height="40%" />
    </mx:VBox>




    <!-- debut share ________________________________________________________________________________________________________________ -->

    <!-- <rtc:FileShare id="fileManager" width="100%" height="20%" /> -->




    <mx:Text id="notificationMessage" text=""/>

    <mx:VBox width="40%" height="10%" right="0">
    <mx:DataGrid id="_fileGrid" dataProvider="{_fileDescriptors}" width="100%" height="90%">
    <mx:columns>
    <mx:DataGridColumn dataField="name"/>
    <mx:DataGridColumn dataField="size"/>
    </mx:columns>
    </mx:DataGrid>
    <mx:HBox>
    <mx:Button id="upload_btn" label="Upload File" click="onUploadClick()"/>
    <mx:Button id="download_btn" label="Download File" click="onDownloadClick()"/>
    <mx:Button id="delete_btn" label="Delete File" click="onDeleteClick()"/>
    </mx:HBox>
    </mx:VBox>




    yes i don't see what do you say !! Where i will do this ?




    Many thanks ,


    Lionceau,
    March 4, 2009
    look my source :

    <![CDATA[
    import mx.controls.Alert;

    import com.adobe.rtc.events.SessionEvent; //utilisé pour les trois blocs
    import com.adobe.rtc.messaging.UserRoles; //utilisé pour les trois blocs
    import com.adobe.rtc.collaboration.AudioPublisher; // AudioPublisher me sert pour la gestion du microphone
    import com.adobe.rtc.collaboration.AudioSubscriber; // me sert pour choisr l' aboné écouté
    //import com.adobe.rtc.collaboration; // me sert pour la gestion du microphone
    //import com.adobe.rtc.clientManagers;// me sert pour la gestion du microphone


    import com.adobe.rtc.events.StreamEvent;// pour le son (audio xml)



    import mx.events.ItemClickEvent; //pour le son ( audio xml)
    import mx.controls.Label;
    import mx.core.UIComponent; // me sert pour la gestion du microphone
    import flash.events.EventDispatcher;// me sert pour la gestion du microphone
    // import com.adobe.rtc.components:ResizableCanvas; amettre?


    //debut bloc share
    import com.adobe.rtc.sharedManagers.descriptors.FileDescriptor;
    import mx.utils.UIDUtil;
    import mx.collections.ArrayCollection;
    import com.adobe.rtc.collaboration.FileSubscriber;
    import com.adobe.rtc.sharedManagers.UserManager;
    import com.adobe.rtc.messaging.NodeConfiguration;
    import com.adobe.rtc.events.CollectionNodeEvent;
    import com.adobe.rtc.collaboration.FilePublisher;
    import com.adobe.rtc.sharedManagers.FileManager;

    [Bindable]
    private var applicationTitle:String = "File Publisher Example";

    // list of managers
    private var _fileManager:FileManager;
    private var _filePublisher:FilePublisher;
    private var _fileSubscriber:FileSubscriber;
    private var _userManager:UserManager;

    // our datagrid dataprovider will use this collection
    [Bindable]
    private var _fileDescriptors:ArrayCollection = new ArrayCollection();

    // file sharing group id, it is similiar to that of folder concept
    private var _groupid:String = "_filePublisherExample";
    //fin bloc share

    //debut bloc camera

    import com.adobe.rtc.events.UserEvent;
    import com.adobe.rtc.events.SharedPropertyEvent;
    import com.adobe.rtc.events.ConnectSessionEvent;
    import mx.controls.Button;
    import com.adobe.coreUI.controls.CameraUserBar;
    import mx.core.UITextField;


    import com.adobe.rtc.events.SharedPropertyEvent;
    import com.adobe.rtc.sharedModel.SharedProperty;
    import com.adobe.rtc.collaboration.WebcamSubscriber;
    import mx.containers.VBox;
    import com.adobe.rtc.events.UserEvent;
    import com.adobe.rtc.sharedManagers.StreamManager ;
    import com.adobe.rtc.sharedManagers.descriptors.StreamDescriptor ;

    private var currentSubscriber:WebcamSubscriber ;
    private var sharedProperty:SharedProperty ;





    /**********************************************************
    * This example shows how the camera component can be used with a publisher and a
    * number of subscribers. The publisher has a big view while subscribers have a small view.
    * A shared property is used to pass the stream to the publisher's user interface.
    * Every user is provided with play and pause handlers.
    * *********************************/
    private function onCreationComplete():void
    {
    sessionManager.roomManager.autoPromote = true ;
    sessionManager.roomManager.guestsHaveToKnock = false ;

    sharedProperty = new SharedProperty();
    sharedProperty.isSessionDependent = true ;
    sharedProperty.sharedID = "webcamShare2" ;
    sharedProperty.connectSession = sessionManager ;
    sharedProperty.subscribe();
    sharedProperty.addEventListener(SharedPropertyEvent.CHANGE,onChange);
    sessionManager.userManager.addEventListener(UserEvent.USER_REMOVE,onUserRemove)
    }

    /**
    * @private
    */
    protected function onUserRemove(p_event:UserEvent):void
    {
    if ( sharedProperty.value && p_event.userDescriptor.userID == sharedProperty.value[0]) {
    sharedProperty.value = [] ;
    }
    }


    /**************
    * When the main big stream changes, all users can view it via the sharedProperty.
    *
    *********************/
    private function onChange(p_evt:SharedPropertyEvent):void
    {
    if ( currentSubscriber != null ) {
    clickedContainer.removeChild(currentSubscriber);
    currentSubscriber.close();
    currentSubscriber = null ;
    }

    if ( sharedProperty.value == null || sharedProperty.value.length == 0 ) {
    return ;
    }


    currentSubscriber = new WebcamSubscriber();
    currentSubscriber.connectSession = sessionManager ;
    currentSubscriber.subscribe();
    currentSubscriber.webcamPublisher = webCamPub ;
    currentSubscriber.publisherIDs = sharedProperty.value ;
    currentSubscriber.addEventListener(UserEvent.USER_BOOTED,onCleared);
    currentSubscriber.addEventListener(UserEvent.STREAM_CHANGE,onCameraPause);
    clickedContainer.addChild(currentSubscriber);
    invalidateDisplayList();

    }

    /************************
    * If the big image is stopped, clear it.
    *
    ********/
    private function onCleared(p_evt:UserEvent):void
    {
    if ( sessionManager.userManager.myUserRole == UserRoles.OWNER ) {
    sharedProperty.value = [] ;
    }
    }

    /***********
    * Clicking on the small image below makes it large.
    *****/
    private function onClick(p_evt:MouseEvent):void
    {

    if ( (p_evt.currentTarget is WebcamSubscriber) && !(p_evt.target.parent is CameraUserBar)) {
    sharedProperty.value = (p_evt.currentTarget as WebcamSubscriber).publisherIDs;
    }
    }

    /**
    * Handler for a user pausing the camera.
    */
    protected function onCameraPause(p_evt:UserEvent):void
    {
    var userStreams:Array = sessionManager.streamManager.getStreamsForPublisher(p_evt.userDescriptor.userID,StreamManager.CAMERA_STREAM);

    if (userStreams.length == 0) {
    trace("onCameraPause: no userStreams");
    return;
    }

    for (var i:int = 0; i< userStreams.length ; i++ ) {
    if (userStreams .type == StreamManager.CAMERA_STREAM ) {
    break;
    }
    }

    var streamDescriptor:StreamDescriptor = userStreams
    ;
    if ( streamDescriptor.streamPublisherID == sessionManager.userManager.myUserID ) {
    sessionManager.streamManager.pauseStream(StreamManager.CAMERA_STREAM,!streamDescriptor.pause,streamDescriptor.streamPublisherID);
    }
    }


    /****
    * Handler for a user stopping the camera.
    */
    private function onBooted(p_evt:UserEvent):void
    {
    if ( (p_evt.currentTarget is WebcamSubscriber) && (p_evt.userDescriptor.userID == sessionManager.userManager.myUserID || sessionManager.userManager.myUserRole == UserRoles.OWNER)) {
    webCamPub.stop();

    if ( (p_evt.currentTarget.parent as VBox).getChildAt(1) is Button ){
    ((p_evt.currentTarget.parent as VBox).getChildAt(1) as Button).label = "Start" ;
    }

    if ( sharedProperty.value && (sharedProperty.value as Array)[0] == p_evt.userDescriptor.userID ) {
    sharedProperty.value = [] ;
    }
    }
    }






    ]]>
    </mx:Script>
    Participating Frequently
    March 4, 2009
    Lionceau,
    again, what are the data types of the webcamPublisher property and of your webCamPub object? Once you see what data types they have, you will probably see why the mismatch is occurring,
    Richard
    March 4, 2009
    sorry in my topics i don't say the code

    it is here the error :

    currentSubscriber.webcamPublisher = webCamPub ;


    what do you think ?

    Lionceau,
    Participating Frequently
    March 4, 2009
    Lionceau,
    the error message is saying that you have a variable of one type but the compiler is expecting a different type according to the object definition. At a guess (I know nothing about the collaboration:AudioSubscriber class) the audioIds source that you are using to fill the publisherIDs property is the wrong type. What data type does publisherIDs expect, and what data type is audioIds?
    Once you have sorted out the data type correctly you should be a step closer. Flex can be quite particular about data type matching, which is a Good Thing on the whole,
    Richard
    March 4, 2009
    yes i do it , then i have just one error ,

    Severity and Description Path Resource Location Creation Time Id
    1067: Contrainte implicite d'une valeur du type Array vers un type sans rapport com.adobe.rtc.collaboration:WebcamPublisher. essai/src essai.mxml line 392 1236175295406 413



    What is it ?



    Lionceau,
    Participating Frequently
    March 4, 2009
    Lionceau,
    the last 4 errors (1180) are all saying the same thing - you have set an event property pointing to an event definition which you have not supplied. So for example the userBooted event is trying to find a method in your code called onBooted, but you have not written it at all. Are you at all familiar with the process of writing event handlers? If not, then check out the help documentation as this is absolutely basic to developing an application.
    The two errors 1120 are saying something quite similar: in this case you are trying to point to a data provider of some kind, which again you have not written.
    I suggest you take a step back from just trying to guess at code and look at some worked examples,
    Richard
    March 4, 2009
    thanks i see ,

    look this code :
    <collaboration:AudioSubscriber id="audioSub" publisherIDs="{audioIds}"/>


    <mx:Tile id="camTiles"
    direction="horizontal"
    height="100%"
    width="100%"
    alpha="0"
    horizontalScrollPolicy="off"
    verticalScrollPolicy="off"
    creationComplete="onCreationComplete()"
    horizontalGap="10" verticalGap="10">

    <mx:Repeater id="rp" dataProvider="{selectedUsers}">




    <mx:Canvas id="rs" width="100%" height="100%"
    minHeight="200" minWidth="200"
    backgroundAlpha=".5"
    backgroundColor="gray"
    cornerRadius="12"
    borderStyle="solid"
    horizontalScrollPolicy="off" verticalScrollPolicy="off">


    <collaboration:WebcamSubscriber webcamPublisher="{webCamPub}"
    width="100%" height="100%"
    publisherIDs="{[rp.currentItem.userID]}" click="onClick(event)"
    userBooted="onBooted(event)" streamChange="onCameraPause(event)">
    </collaboration:WebcamSubscriber>





    </mx:Canvas>

    </mx:Repeater>
    <!-- -->
    </mx:Tile>


    why i have this error ?What i must do import ?
    I believe i miss the code !


    Severity and Description Path Resource Location Creation Time Id
    1067: Contrainte implicite d'une valeur du type com.adobe.rtc.collaboration:AudioPublisher vers un type sans rapport Array. essai/src essai.mxml line 346 1236172700171 262
    1120: Accès à la propriété non définie selectedUsers. essai/src essai.mxml line 359 1236172700171 263
    1120: Accès à la propriété non définie webCamPub. essai/src essai.mxml line 373 1236172700171 264
    1180: Appel à une méthode qui ne semble pas définie, onBooted. essai/src essai.mxml line 376 1236172700156 260
    1180: Appel à une méthode qui ne semble pas définie, onCameraPause. essai/src essai.mxml line 376 1236172700156 261
    1180: Appel à une méthode qui ne semble pas définie, onClick. essai/src essai.mxml line 375 1236172700156 259
    1180: Appel à une méthode qui ne semble pas définie, onCreationComplete. essai/src essai.mxml line 356 1236172700156 258




    Lionceau,