Problem with NetConnection in Flex using Flash Media Server

I'm attempting to place a function on a NetConnection instance, and from everything I've read, I should be able to do that. Unfortunately, I'm getting an error when I compile. Here's my code, and my error is below the code, please let me know if you have a solution. Thanks for the help!
import mx.rpc.events.ResultEvent
import flash.net.NetConnection;
import flash.net.navigateToURL;
import flash.events.NetStatusEvent;
import flash.events.StatusEvent;
import flash.text.TextField;
public var nc:NetConnection;
// init is called on creationComplete
public function init():void{
     nc = new NetConnection;
     nc.addEventListener(NetStatusEvent.NET_STATUS,onConnect);
     nc.connect("rtmp://localhost/FMSTesting");
public function onConnect(event:NetStatusEvent):void{
        myText.text = nc.connected + event.info.code;
//nc.myFunction is the function that will be called
//from the main.asc server side file and this is where I get
// the red x in Flex Builder 3 telling me there's an error
nc.myFunction = function():void{
error generated by the nc.myFunction line is:
1119:Access of possibly undefined property myFunction through a reference with static type flash.net:NetConnection
I tried putting the function declaration inside the onConnect handler and inside the init function, niether will remove the error.

Can you write piece of code which you can trigger on click of button. I mean put a button on your swf file say name it "btnstopPublish" and click on it. Write below code snippet in click handler of the button and see if it works for you,
btnstopPublish.addEventListener(MouseEvent.CLICK, stopPublish);
function stopPublish_Play(eventObj:MouseEvent){
  ns.publish(false);
  ns.close();
nsPlayer.play(false);
nsPlayer.close();

Similar Messages

  • Problem with NetConnection in Adobe AIR(Flex) using Flash Media Server.

    Hi
    I am creating a small chat application using Flash Media server. I have already created all my user interface components in Flex(Adobe AIR).In this application rather than sending text messages user can also  send  file to another user in his friend list.
    problem what i am facing is, when i am sending file through FMS most of time it send successfully but for some files while sending  application loss netconnection.
    so i would like to know, rather than closing application what are other condition when FMS loses network connection?
    Any help would be appreciated .
    Thanks.

    Hi. It looks like your code is not finding the mp3. At least,
    I can reproduce your error code by removing the mp3 from the
    directory, or renaming it.
    Btw, if you test with FF instead of IE, you'd see the error:
    Error #2044: Unhandled IOErrorEvent:. text=Error #2032:
    Stream Error.
    at KZFlash_fla::Sound_2/KZFlash_fla::frame1()
    Hope that helps.

  • How to use flash media server with cisco show n share live event module?

    hello all
    Is it  possible to use flash media server in show n share (non dme)live event ?  i 've configured flash media server, can receive  multicast streams, bu i have no idea what to write in video url fild in the live event basic setup.

    Hi Temur,
    You should be able to stream from a Flash Media Server.
    The URL should look like this:
    rtmp://xxx.yyy.com//flv:
    You can do some tests from a PC to get the exact URL that would suit your environment.
    Regards,
    Nicolas

  • How To Use Flash Media Server For RPG Game Development Project ?

    I have a educational music video game development project (A Sea Voyage)  for whcih I am thinking to use the Adobe Flash Media Server for develping the 3D Game for which I plan to also use two other key tools,  blenderartist.org for 3D Creation of my ship, and use the popular game engine tool,  unity.com to integrated all my game elements.
    How to use the Adobe Flash Video Streaming Server Element for this RPG Type Game, internet friendly and desktop anchored ?
    Cafe Twin
    Metro Washington DC Hub

    I'm more or less in the same boat. I've got the admin console
    up. I am able to run the vodtest application locally pointing the
    video file to rtmp://localhost/vod/sample.flv or using the server
    name instead of localhost as in rtmp://mclmedia/vod/sample.flv
    I can also load the html and swf file to my xp machine that
    has access to the server via our internal network. (DNS isn't
    configured yet) But the connectionFailed message appears when I try
    to call the videos using rtmp://mclmedia/vod/sample.flv

  • Help me step by step for using Flash Media Server!

    Dear all!
    With reference to advertisement/introduction of in website (http://www.adobe.com/ ), I am writing to you to request some things bellows:
    My company would like build video streaming application on Website (and mobile in future), maybe something likes http://youtube.com . It is streaming: films, video clips with the different sizes which are stored in folder of server with high quality, powerful, secure, extendable, high-performance, highly scalable, and custom video solutions. After I went through the Flash Media Interactive Server 3.5 of Adobe I see that it seem usefully with the streaming video application of my company. So that, before my company purchases the Flash Media Interactive 3.5 software we would like use trial the Flash Media Interactive Server 3.5 software with full features, unlimited the end users, and full functions in few months. And  we hope you provide full Flash Media Interactive 3.5 software and guide clearly, more details and more focus for “how to use the Flash Media Interactive Server 3.5 for matching with our application” during use trial. If we see this software which displays well the streaming video application and it matches with our application so that we will purchase this software immediately.
    Addition, did we have the encoder (video, film) software when we purchase full Flash Media Interactive Server 3.5? Because, I know that adobe media encoder CS4 supports for encoding video/film to FLV/F4V, but it is different software and do not package with Flash Media Interactive Server 3.5 software. And do you have software to encode automatically video/film like flash media live encoder? Because I think that there are some troubles to use adobe media encoder CS4 for encoding video/film such as: sequential, so slow, non-auto encoding and occupies 100% CPU performance.
    Finally, adobe flash player 10 in Flash Media Interactive 3.5 has HD (+,-) feature. But I do not know to use it? Could you tell us more?
    Please give me your hotmail for chatting and reply us early!
    Thank for your prompt help!
    Sincerely,
    Thao Nguyen Thi,
    Online application Center
    Vietnam Data Communication Company – Center II (VDC2).
    Email: [email protected]

    Hi Thao Nguyen Thi,
    You could download the Flash Media Development Server for free which provides the complete feature set. The only limitation is on the number of connects (allows only 10). But you could use that to try out a scaled down deployment which might give you an idea on what factors to consider while scaling up while allowing you to try out the streaming aspects.
    There is also this helpful document http://www.adobe.com/devnet/flashmediaserver/articles/fmis_largescale_deploy.html which gives a lot of useful information while going about the deployment.
    From what you say you seem to be interested to know the deployment of Video on Demand (VOD) streams.
    Thanks
    Mamata

  • Problems with deploying cmproster example using ms sql server as database

    hi to all,
    im new to ejb and i like to learn by doing the examples given in the j2ee tutorial. i want to deploy the cmproster with a bit of modification...i want to use ms sql server as the database..i have configured the data source and connection pools correctly..and when i run the Client Application there is no error. The database seems fine it was populated correctly..only some of the values become null..
    Here is the sample output from the client app:
    P7 null null 777.0
    P8 null null 65.0
    P10 null null 100.0
    P6 null null 555.0
    P9 null null 100.0
    The two columns should be strings...i look at the server.log and there where errors:
    Error while getting value from resultset at index 2 as resultType 21columnSqlType=JDO76: 12.Exception java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index
    I think thats the culprit...Can anyone help me on this? tnx
    Note:
    By the way im using sun.jdbc.odbc.JdbcOdbcDriver for the jdbc driver
    Thanx
    -oyam

    Hi Michael,
    At this time SQL Server 2000 is not certified for WLCS 3.5. Since the
    schema has changed between 3.2 and 3.5, running the 3.2 scripts is not a
    good idea.
    I can tell you that certification is in progress for SQL Server 2000. Your
    best bet is to contact your Sales Representative to get an idea of when
    certification might be coming.
    I hope this helps.
    - Ginny
    "Michael Schulz" <[email protected]> wrote in message
    news:[email protected]..
    I'm using WebLogic 6.0sp1 with Commerce Server 3.5 and I've successfully
    installed the demo. I would like to create another commerce server
    installation, this time using Microsoft SQL Server 2000 as the database
    instead of Cloudscape. I've downloaded and installed the BEA jDriver
    for MS SQL 7/2000 and tested it using dbping. My question is: where are
    the db scripts for creating and populating the commerce database? I've
    found the WLCS_320_DB_DDL_1.1.zip file on the BEA downloads site, but
    I'm concerned that this schema is for Version 3.20 of Commerce Server.
    Is there a similar file for WLCS 3.50? If not, is it safe to use this
    one?
    If this is posted in the wrong place, please let me know and I'll repost
    to the appropriate newsgroup as required.
    Sincerely,
    Michael Schulz

  • Problems with downloading, installing, or using Flash Player

    For quicker resolution to your problems related to Flash Player, use the Flash Player forum (http://forums.adobe.com/community/flashplayer/installing_flashplayer?view=overview)

    Or http://forums.adobe.com/community/flashplayer/using_flashplayer?view=discussions

  • Is Flash Media Server is Thread Safe?

    Hello,
    I am trying to develop a game in flex, using flash media server 4.5. As its a multiplayer game, the server side code, should be multi threaded.
    Please let me know, is the "Flash Media Server 4.5" has Thread Safety mechanism. Please provide me any link( or guide me) to have detail decription regarding this.
    Thanks in advance.

    Hi,
    I am not sure if this exactly will help you but you can use SharedObject class to store data shared by different clients. With this you can also achieve synchronization. Below link has the details about SharedObject class:
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/SharedObject. html
    Also, following link has an example which shows how to synchronize users and store data using SharedObject:
    http://help.adobe.com/en_US/FlashMediaServer/3.5_Deving/WS5b3ccc516d4fbf351e63e3d11a0773d3 7a-7fff.html

  • Windows Vista and Flash Media Server Streaming Problems

    My company recently started using Flash Media Server to
    stream audio and video content.
    My boss just installed Windows Vista Ultimate and now no
    streaming content will play at all. Simple Flash animations work,
    but nothing that accesses the Flash Media Server for content. I've
    uninstalled and reinstalled multiple versions of the Flash Player
    on his machine but nothing seems to work. I also tried the new
    "Reset" feature in IE that is supposed to return it to it's
    shipping state and that didn't work. I navigated to the "System 32"
    folder and ran the Flash Updater EXE. I downloaded and installed
    all of the available updates through "Windows Update".
    I also tested Flash Objects that stream video on Adobe.com
    and they don't play either. Has anyone heard of this happening or
    know what I need to do to fix it? I don't know if this is a bug in
    the Flash Player or with Windows Vista.

    This appears to be the solution:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=44&catid=184&threadid =1243464&enterthread=y

  • Is it possible to use smartseek functionalities without FMS(flash media server)??

    Hi,
        Is it possible to use smart seek functionalities to play files local files without using flash media server(FMS).
        I am currently using videoDisplay components but can switch to netStream component if it is possible without FMS.
        As I have to seek frame by frame but the current seek() function doesnot provide that functionality.
        Any kind of suggestion is most welcome.
        Thanks in Advance.

    I'd like to revive this topic as I just purchased an ATV. I do like it but I am becoming very familiar with the limitations of the ATV.
    I used to have a Snyology NAS server but it did not serve/stream the iTunes well enough to my stereo. I have a lot of photos of my children as well as movies and wanted to see more of them so I purchased the ATV as I knew the Syno server/NAS would be bricking soon.
    Once the ATV is loaded it is fine for that content. But if there is other content on other computers well, they have to stream and the content on the ATV is not accessible to anything other than the stereo or TV that the ATV is connected to. So, finally, here is my question:
    Which NAS streams VERY WELL with the ATV? Correct me if I am wrong but the NAS has to have iTunes imbedded within the server; yes? Secondly, is the best solution for serving an ATV as well as having all media content accessible to all LAN computers a Mac Mini?
    So which is it? Please recommend an NAS that can serve iTunes media (music, photos, video) to an Apple TV or is the best solution a Mac Mini which acts like a NAS and streams all media content to the Apple TV and ATV will stream it to HDTV through HDMI , etc.
    The ATV is great with the High Def.., wide screen, Dolby 5.1, HDMI port , etc. Just need a way to have the media accessible to everyone on the LAN as well as serve/stream to an already purchased Apple TV.
    Thanks for the help,
    Cc

  • GEO Location with Flash media server 4.5

    Ok so here is what im having issues with... i have 3 servers france, LA,Florida all using Flash media server Enterprise.. now my issues is my site has 5 channels of feeds but i have people from all over the world and some get bufffering issues to my servers cause they are too far.. now if my floplayer or fms could somehow tell where they are and point them to the closer server is this at all possible?

    I have not used Flowplayer but is there a way to find bandwidth between client and server using Bandwidth API's which FMS & AS provides - now before using any server you can do quick check and server which returns connection in minimum time and has better bandwidth and then choose that server. I think some delay uprfront is much better in terms of usablity than constant buffering.

  • Live Streaming video and Flex2(3?) + Flash Media Server?

    I've seen alot of topic on how to create video sites for
    clips, etc. with Flex and Flash Media Server, but how about live
    streaming video, like a concert or a seminar. I can't find any
    information on this at all, could anyone point me in the right
    direction?

    What you need is grab video/sound form camera/mic, publish it
    on FMS and let the other clients play it. In a few steps:
    // get camera and mic
    var cam:Camera = Camera.getCamera(); // get default camera
    var mic:Microphone = Microphone.getMicrophone(); // get
    default mic
    // if you have VideoDisplay, for monitoring
    videoDisplay.attachCamera(cam);
    // create new RTMP connection to FMS/your app
    var nc:NetConnection = new NetConnection();
    // new stream should be create *after* nc has connected, not
    before
    // so this is executed after the below nc.connect() succeeds
    nc.attachEventListener(Event.CONNECT, function(){
    var ns:NetStream = new NetStream();
    ns.attachCamera(cam);
    ns.attachMicrophone(mic);
    ns.publish("streamname", "live"); // or "record" if you want
    to live+rec
    // connect to default instance of app 'appname' on your FMS
    nc.connect("rtmp://fms.ip.address/appname");
    If you're using Flex2 and FMS2 (the latest FMS is 3), you
    might need to
    cuange the connection encoding to AMF0 (which is what FMS2
    uses) in order for this to work.
    Hope this helps; I've written it from my head so it probably
    has mistakes, but it's the general workflow; the docs in the
    language reference for specific functions mentioned here will also
    help.

  • Bitmapdata + Flash Media Server 3

    I could not make streaming bitmapdata using Flash Media
    Server 3.
    I am using the default connection, and continues giving the
    same issue of conversion.
    This code:
    private function init():void
    if(nc){
    nc.close()
    nc = new NetConnection();
    NetConnection.defaultObjectEncoding =
    flash.net.ObjectEncoding.AMF3;
    nc.addEventListener( NetStatusEvent.NET_STATUS, netStatus );
    nc.connect("rtmp://localhost/fmsdemo/demo", "demo");
    private function netStatus( event:NetStatusEvent ):void
    switch( event.info.code ) {
    case "NetConnection.Connect.Success":
    _labelStatus.text = "Status: Conexão realizada com
    sucesso!";
    nc.client = this;
    users_so = SharedObject.getRemote("users_so", nc.uri, true);
    users_so.addEventListener( SyncEvent.SYNC, usersSyncHandler
    users_so.connect( nc );
    users_so.client = this;
    break;

    Hello :)
    You must try to transform your BitmapData in ByteArray ...
    you dispatch
    your ByteArray to the server... and when you receive the
    ByteArray to
    the server you transform your ByteArray in BitmapData ;)
    See the code source in my French article about AMF3 and
    classmapping
    with FMS3 :
    http://www.ekameleon.net/blog/index.php?2008/01/27/92--fmis3-flash-media-interactive-serve r-3-amf3-and-classmapping
    To transform un objet in ByteArray i use the code :
    var buffer:ByteArray = new ByteArray();
    buffer.writeObject( myObject );
    And to transform the ByteArray in a new object :
    var o:* = buffer.readObject();
    For me this solution is a good solution to send objects with
    AMF3. AMF3
    support ByteArray, XML(E4X), Number, Boolean, String, Object,
    Array and
    class mapping (use registerClass). I don't think AMF3 support
    the
    BitmapData type ?
    EKA+ :)
    egenial a écrit :
    > Sorry, tightness enter unintentionally.
    >
    > Continue...
    >
    > var bd:BitmapData = new
    BitmapData(_videoDisp.width,_videoDisp.height);
    > bd.draw(_videoDisp);
    > users_so.send("recebe", bd)
    >
    >
    > Receive...
    >
    > public function recebe(bd:BitmapData):void
    > {
    > var out:Bitmap = new Bitmap();
    > out.bitmapData = bd;
    > _myVideoComponent.addChild(out);
    > }
    >
    > Error....
    >
    > Error #2044: Unhandled AsyncErrorEvent:. text=Error
    #2095:
    > flash.net.SharedObject was unable to invoke callback
    recebe. error=TypeError:
    > Error #1034: Type Coercion failed: cannot convert
    Object@ebd6719 to
    > flash.display.BitmapData.
    >
    > Anyone know any solution? I want to make streaming
    bitmapdata.
    >
    > I use AMF3
    > __Info___________________________
    > level -> status
    > objectEncoding -> 3
    > code -> NetConnection.Connect.Success
    > description -> Connection succeeded.
    >
    > Thanks!
    >
    >

  • Flash media server stops accepting connection.

    We have one application in which we are using flash media server 2.0.5. We dont know why it's stop taking connection occasionally at that time we can't enter into the managment console. We get a white screen. When we try to enter user name and password it's does not accpet the credentials. We are not getting anything in the log.
    Port number 1935 and 1111 of the particular system where FMS has placed are working fine.
    Does anybody have any idea why we are facing this problem?

    That's a pretty old version, have you thought of upgrading?
    There are a few reasons this could be happening. You could be reaching the limit for connections or bandwidth.
    There could be a problem in your server side coding that is stalling the app.
    There could be a problem with the service itself and it's maxing out on memory or CPU. I don't know why you are getting a white screen for anything, the management console has never been white for me and I suspect that it's more of a local computer problem unless it's the same computer you are running the service on..
    Any more information on the license, server hardware or environment?

  • Flash Media Server 3 / FlashPioneer Video Chat

    Just recently, I purchased and installed
    'FlashPioneerVideoChat'...
    I decided to use Flash Media Server 3 (developer addition)
    for the local server. The problem is you can't login to the FMS
    Server from the client end although all other communication aspects
    work fine. When a connection is made the login starts but doesn't
    open the application, it just keeps running. The Client side has
    been debugged and tested so that points to the Flash Server and
    whatever settings have to be made and/or code added to what file?
    Could someone please point me in the right direction, Thank
    you much ...
    [email protected]

    Hi, but doesn't the linux version work on a mac?
    I'm a bit confused here.
    I currently shoot video on a Canon mini dv camera and edit in Apple imovie.
    Convert to Apple Quicktime and then import into Flash 8 video encoder.
    I ftp the clips upto a flash server, from my mac and upload the playlist to my website host
    using Flash 8.
    Don't tell me i've now got to get one of those dreadful PC thingies to complete the loop,
    surely Adobe didn't invent this wonderful piece of software so it could run from a PC?
    Or did they?
    Andrew C-B.

Maybe you are looking for