Ah!! .. just comment the following line.
nc.client = new CustomClient();
This object receive the netconnection remothe method calls.
now should be:
//nc.client = new CustomClient();

On 3/14/07, Clint Tredway <[EMAIL PROTECTED]> wrote:

trying the code you provided and FB is saying CustomClient is not a
valid method..

On 3/13/07, l u c h y x <[EMAIL PROTECTED]> wrote:
> I think you're trying to say "action script 2" or "action script 3".
> The answer is yes, you can use both version of movies "flash 7, 8 and
9".
> Also the as3 NetConnection Class has the property of ObjectEncoding in
order
> to user amf0 or amf3 format.
> More about amf format here.
> http://osflash.org/documentation/amf
>
> This is a tiny example that you can compile, create a new mxml
> file-application in flexbuilder paste this code and hit run.!
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
layout="vertical"
> horizontalAlign="left" pageTitle="Simple Chat">
> <mx:Script>
>      <![CDATA[
>         import mx.utils.ObjectUtil;
>         import mx.controls.Alert;
>         import flash.events.NetStatusEvent;
>         import flash.events.SyncEvent;
>         import flash.net.NetConnection;
>         import flash.net.SharedObject;
>
>         [Bindable] private var connected:Boolean = false;
>         private var nc:NetConnection = null;
>         private var so:SharedObject = null;
>         private function doconnect():void {
>             if(!nc){
>                 nc = new NetConnection();
>
> nc.addEventListener(NetStatusEvent.NET_STATUS,onConnectHandler);
>                 nc.addEventListener
> (SecurityErrorEvent.SECURITY_ERROR,onConnectErrorHandler);
>                 nc.client = new CustomClient();
>                 nc.connect("rtmp://192.168.1.2/oflaDemo");
>             }
>         }
>         private function sendText():void {
>             so.setProperty("chat",msj_txt.text);
>         }
>         private function onChatUpdate(event:SyncEvent):void
> {
>             log_t.text
> +="\n-------------------\n"+mx.utils.ObjectUtil.toString(event);
>             if(so.data.chat != undefined) {
>                 chat_txt.text += so.data.chat+"\n";
>             }
>             msj_txt.text = "";
>         }
>         private function
> onConnectErrorHandler(event:SecurityErrorEvent):void {
>             Alert.show(event.text,"Error on Connect");
>         }
>         private function onConnectHandler(event:Event):void
> {
>             connected = nc.connected;
>             con_btn.label = "Exit";
>             so = SharedObject.getRemote("simpleChatDemo",nc.uri, false);
>             so.addEventListener(SyncEvent.SYNC,onChatUpdate);
>             //so.client = this;
>             so.connect(nc);
>              //logtree.dataProvider = eventss;
>         }
>      ]]>
>  </mx:Script>
>  <mx:TitleWindow width="100%" height="100%" title="Red5 Chat">
>      <mx:HDividedBox width="100%" height="100%">
>          <mx:TextArea width="100%" height="100%" id="chat_txt" />
>          <mx:TextArea width="320" height="100%" id="log_t" />
>     </mx:HDividedBox>
>  <mx:ApplicationControlBar width="420">
>      <mx:TextInput id="msj_txt" width="260" enter="sendText()"/>
>      <mx:Button label="Send" enabled="{connected}" click="sendText()" />
>      <mx:Button label="Connect" id="con_btn"  click="doconnect()"/>
>  </mx:ApplicationControlBar>
>   </mx:TitleWindow>
> </mx:Application>
>
>
>
>  On 3/13/07, Nankun Huang <[EMAIL PROTECTED]> wrote:
> >
> > Yes its possible, they use the same classes in the flash.net package
> >
> > I read somewhere back that John is converting some of the samples to
flex
> >
> >
> >
> > On 3/13/07, Clint Tredway <[EMAIL PROTECTED]> wrote:
> > > is it possible to use flex/as3 with Red5 or just flash? if it can be
> > > used with Flex are there any examples?
> > >
> > > --
> > > http://indeegrumpee.spaces.live.com/
> > >
> > > _______________________________________________
> > > Red5 mailing list
> > > [email protected]
> > > http://osflash.org/mailman/listinfo/red5_osflash.org
> > >
> >
> >
> > _______________________________________________
> > Red5 mailing list
> > [email protected]
> > http://osflash.org/mailman/listinfo/red5_osflash.org
> >
> >
>
>
>
> --
> Luciano Bustos - Luchyx
> ----------------------------------------
> r i a e v o l u t i o n (r)
>  [EMAIL PROTECTED]
> http://www.riaevolution.com
> Phone: +54 (11) 4931-7006
> _______________________________________________
> Red5 mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/red5_osflash.org
>
>


--
http://indeegrumpee.spaces.live.com/

_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org




--
Luciano Bustos - Luchyx
----------------------------------------
r i a e v o l u t i o n (r)
[EMAIL PROTECTED]
http://www.riaevolution.com
Phone: +54 (11) 4931-7006
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org

Reply via email to