Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Cannot call external function

Avatar

Level 3

With the webcam subscriber I have moved the onBooted function out to an external action script file to keep the code tidy. For some reason it says that it is undifined. Everything else is OK. I cant see a reason for it.

Thanks

<mx:Script source="CamAudio.as" />

<mx:TileList selectable="false" borderColor="#000000" borderThickness="2" id="rp" rowCount="2" columnCount="2" width="100%" height="100%" dataProvider="{cSession.userManager.webCamCollection}" borderStyle="solid" paddingRight="0" paddingTop="0" paddingLeft="0" paddingBottom="0">

     <mx:itemRenderer>

          <mx:Component>

               <mx:HBox width="100%" backgroundColor="Red">

                    <rtc:WebcamSubscriber webcamPublisher="{webCamPub}" publisherIDs="{data.userID}" userBooted="onBooted(event)"  streamChange="onCameraPause(event)"/>

               </mx:HBox>

          </mx:Component>

     </mx:itemRenderer>

</mx:TileList>

3 Replies

Avatar

Level 3

I have noticed also now that it also says that the webCamPub is also undefined in the WebcamPublisher="{webCamPub}"

I am not sure what I might have missed.

Avatar

Level 10

Hi,

I can't see WebcamPublisher defined anywhere in the code. You need to do

<rtc:WebCamPublisher id="webcamPub" /> before doing this. See whether doing this fixes the problem of webcamPublisher property or not.

Also , can you put a breakpoint and see whether onBooted gets called if you put in a seperate file. I will run you problem otherwise later in day.

Thanks

Hironmay Basu

Avatar

Level 3

Hi,

Yes I have included it within the code just above what I have pasted in. I will add the break point when I get back to the pc and will let you know.

Thanks