How to connect with Adobe Media Server random remote Shared Object

Hello, I have my application on the web developed in Flash Professional CC and exported to Flash Player 13.

In my web app, I have 2 classes: connection (which creates the connection with my Adobe Media Server) and GlobalObject (that creates the remote shared object).

This is the code I have:

Connection class

import flash.events.AsyncErrorEvent;

import flash.events.Event;

import flash.events.IOErrorEvent;

import flash.events.SecurityErrorEvent;

import flash.events.SyncEvent;

import flash.events.NetStatusEvent;

import flash.net.NetConnection;

import flash.net.ObjectEncoding;

import flash.net.SharedObject;

var nc:NetConnection = new NetConnection();

nc.objectEncoding = ObjectEncoding.AMF3;

NC.client = this;

nc.proxyType = "best";

nc.addEventListener (NetStatusEvent.NET_STATUS, netSAServerRTMPStatus);

nc.addEventListener (IOErrorEvent.IO_ERROR, onIOError);

nc.addEventListener (AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);

nc.addEventListener (SecurityErrorEvent.SECURITY_ERROR, onSecurityError);

NC. Connect ("rtmp://myAMS_URL:1935 / myApp", "myRandomChannel");

var _ro:GlobalObject;

function onIOError(e:IOErrorEvent):void

{

trace ("onIOError");

}

function asyncErrorHandler(e:AsyncErrorEvent):void

{

trace ("asyncErrorHandler =" + e.error);

}

function onSecurityError(e:SecurityError):void

{

trace ("onSecurityError =" + e.error);

}

function netSAServerRTMPStatus(event:NetStatusEvent):void

{

Switch (info.code)

{

case "NetConnection.Connect.Success":

trace ("Connected");

ConnectToSharedObject();

by default:

trace (e.info.code);

break;

}

}

function ConnectToSharedObject (): void

{

_ro = new GlobalObject();

var randomRO:Number = Math.Random ();

_ro. Connect (randomRO, nc, false);

trace (_ro. Connected);

If (_ro. Connected is true)

{

_ro.addEventListener ("onNewMsg", onNewMsg);

_ro.sendNewMsg ("hello");

}

}

function onNewMsg(e:Event):void

{

trace (e.Target.chatMsg);

}

GlobalObject class

import flash.events.AsyncErrorEvent;

import flash.events.Event;

import flash.events.EventDispatcher;

import flash.events.SyncEvent;

import flash.net.NetConnection;

import flash.net.ObjectEncoding;

import flash.net.SharedObject;

var so: SharedObject;

var connected: Boolean;

var _msg:String;

function GlobalObject()

{

Super();

}

function connect(p_soName:String,_p_nc:NetConnection,_p_persistant:Boolean):void

{

create StoredObject

So = SharedObject.getRemote (p_soName, p_nc.uri, p_persistant);

so.client = this;

Configure the onSync events

so.addEventListener (SyncEvent.SYNC, onSync);

connect to the SO

so. Connect (p_nc);

connected = true

}

function logout (): void

{

so. Close();

}

function onSync(evt:SyncEvent):void

{

trace ("onSync");

}

public void sendNewMsg(msg:String):void

{

so. Send ("mewMsg", msg);

}

function mewMsg(msg:String):void

{

_msg = msg;

dispatchEvent (new Event ("onNewMsg", _msg));

}

The problem is that I have ever received the 'onSync' event, then, so I never got the messages. What I am doing wrong? I have to add or change?

I have no code (C:\ProgramFiles\Adobe\AdobeMediaServer5\applications\myApp) server-side. All this code is compiled and exported as a SWF file, and this is the file that the user charge when go to my Web page.

Hope someon could help me.

Best regards

Manel

Hello

The problem is solved! The point is that the AMS folder that I created were defined as 'direct' default app. Once I changed that, it work corretly.

Best regards

Tags: Adobe Animate

Similar Questions

  • Adobe Media Server or component plug-in software for authentication

    The complement of authentication (used to authenticate the Adobe Live Media encoders connect to FMS) will install with Adobe Media Server as he seeks to Flash Media Server and does not recognize Adobe Media Server.

    Is there a solution or a new version of the authentication Add-In?

    Hello

    The new Add - In has been updated here: https://www.adobe.com/cfusion/entitlement/index.cfm?e=fmle3

    It was in the same place where you could catch the old add-in of so please do not get confused. The 64-bit Add-Ins will now work with AMS 5. Please try and let me know if you are still facing an issue.

    Thank you

    Apurva

  • Is Adobe Media Server Compatible with Windows Server 2012 5 Professional?

    Could someone from Adobe please check the following link is up-to-date and AMS 5 Pro does not support Windows Server 2012?

    http://www.Adobe.com/products/Adobe-Media-Server-Professional/tech-specs.html

    Thank you

    I'm sure they have one, but I have no idea what it is. It will probably be with a relapse of the AMS service pack in the future. Adobe has not officially supported Windows Server 2012 in one of the applications of the company I have worked with, so don't feel that AMS is excluded.

  • How to test bandwidth continuously on localhost with Flash Media Server?

    Hello

    I'm trying debbug my code (ActionScript 3) client that works with Flash Media Server 4 on localhost. Everything seems fine until this day.

    However, when I'm testing my player with other remote streaming servers, I notice the bugs because of the transmission of lower bandwidth between the server and the player.

    Is there a simple way to simulate lower bandwidth with FMS4 on localhost (with config, application.xml, programming...)?

    Thank you

    SEB Ethier

    Have you tried using Client.setBandwidthLimit () API available in SSAS? He can probably help you with what you want to do.

    Beside that, you can use NetLimiter or shunra utlitiy to choke BW like client-side.

    Hope that will help you.

  • System will not be activated. Receive the error message "system could not establish a connection with the activation server.

    Activation.

    My OS system has been altered, so I formatted and installed new, but can not activate. I have this installation id 348020-631951-163976-154093-556113-629786-940105-229483-661432, I need confirmation id because my system could not establish a connection with the activation server

    How to activate Windows XP
    http://support.Microsoft.com/kb/307890/en-us

    See the section titled: "how to activate Windows XP by phone.
    Also, make sure that you do not confuse the product key numbers and letters
    (number 8 for the letter B, etc.)

    How to contact a Microsoft Product Activation Center:
    http://support.Microsoft.com/default.aspx/KB/950929/en=us

    Microsoft Activation centers worldwide telephone numbers:
    http://www.Microsoft.com/licensing/existing-customers/activation-centers.aspx
    (This site is for activating Volume License, but if you call, they will help you)

    The phone number is not working:
    Microsoft Wordwide contacts: http://www.microsoft.com/worldwide/default.aspx

    Once Windows activated / Genuine Advantage Notifications:
    http://www.Microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=afd45b36-3d77-4259-801c-d31a9a90cdcf
    (This tool will confirm that the copy of Windows installed on your PC is genuine and authorized)

    J W Stuart: Http://www.pagestart.com

  • 'Impossible to connect with the activation server' while trying to activate Windows 7

    Stater of the i run windows 7 on a laptop dell inspiron N5050 32-bit, windows asks me to re-enter my product key each tome I get it it displays after loading: impossible to connect with the activation server, see other ways to activate windows, pls make serious saying my trial period has expired why it cannot connect to the server to check the product key? Help, please

    Original title: activate windows

    Have you tried to restart by phone?

    How to activate Windows 7 manually (activate by phone)
     
    1) click Start and in the search for box type: slui.exe 4
     
    (2) press the ENTER"" key.
     
    (3) select your "country" in the list.
     
    (4) choose the option "activate phone".
     
    (5) stay on the phone (do not select/press all options) and wait for a person to help you with the activation.
     
    (6) explain your problem clearly to the support person.
     
    http://support.Microsoft.com/kb/950929/en-us

    Please run the Microsoft Genuine Diagnostics Tool then copy and paste the results into an answer here for further analysis:
    http://go.Microsoft.com/fwlink/?LinkId=52012

  • How to connect with another Board?

    How to connect with another Board?
    I want to create several web page, and I want that with a link on online.
    Edge also stage as flash?

    Use iframes, like this:

    SYM. $("espace réservé") .append ("');

    The src = would be the link to the project dashboard.

  • Can I install Adobe Media Server - 5 standard for Linux Centos 6 AMS?

    I would like to know if I can install standard AMS 5 on Centos 6? And if so which version would be better?

    I see that Amazon EC2 running a version of Adobe Media Server 5 on a Centos 6.3 operating system. So, it must be possible, right?

    I tried to install AMS on 7 Centos 5 but have not been able to get HTTP Dynamic streaming to work properly, so don't want to stuggle again, but I won't be stuck with Centos 5 more that I can't run the latest version of PHP or Lee there.

    Please can someone explain if this is possible?

    Yes AMS works on all 6.x CentOS... CentOS 7 is not supported... We always encourage you to use the latest version of AMS which is 5.0.7 as to date.

  • The Adobe Media Server run on Linux?

    [Newbie Alert]

    My goal is to set up a kind of YouTube or Google Drive of the poor. The user clicks on a MP4 file name and a video clip is broadcast. Similarly for other types of files: MP3, WAV, etc.

    The server OS will be Linux.

    I would be grateful for the help, comments on this and related issues.

    TIA

    Hi Raymond,

    Welcome to the adobe forums.

    Yes, you can install adobe media server on Linux OS. For more information on system requirements minimum requirements please check:Tech specs | Adobe Media Server 5 Professional

    And to set up VOD for HTTP please check broadcast multimedia content on demand (HTTP) and RTMP, please check at the request of broadcast media content (RTMP).

    To configure content storage please go by with this help file: http://help.adobe.com/en_US/flashmediaserver/configadmin/WS5b3ccc516d4fbf351e63e3d119f2925 e64 - 7fc7.html

    Let me know if you need help.

    Kind regards

    Redoutey

  • How to buy the adobe media encoder?

    How to buy the adobe media encoder? I n t have option - buy - when I run the main application to buy a product...

    A license for Adobe Media Encoder is supplied with a licence of cloud creative complete, as well as with a single license product for video applications (After Effects, Premiere Pro).

  • Native integration WebRTC audio/video on all AIRLINES, including Adobe Media Server platforms

    Hey everybody,

    It is obvious that Adobe is very busy trying to deal to improve and fix audio and video bugs on all platforms. Fortunately, the month last Adobe finally made a video H264 with Nellymoser audio stream work on androids! That took some time to make this work. But even if it works, no AIR on androids can still transmit a H264 video. Also AIR on iOS cannot view the videos on-line, but rather the video must be wrapped inside an Apple HLS (HTTP Live Streaming) format that introduced way too much latency for live audio and video streaming. Also AIR cannot transmit Audio AAC and cancellation of echo with Nellymoser just doesn't cut.

    Everyone knows that Flash Player can only the video/audio stream smoothly for users 1 to 10. There is just too much for Adobe to do to get the video to work and work for everyone on all devices.

    So because WebRTC has much more development effort going in there, and because it is presented as a free source to try to make the world exclusive licenses to rethink H264 / AAC audio, Adobe should maybe just focus their efforts on the implementation of the WebRTC libraries existing and especially functional in Adobe AIR.

    Because these libraries are becoming so popular, Adobe may also integrate support for WebRTC the Adobe Media Server for recording, peer-to-peer negotiation and firewall perforation.

    See here my native integration feature request WebRTC video/audio on all platforms

    https://BugBase.Adobe.com/index.cfm?event=bug & ID = 3728399

    If you vote with me for WebRTC in Adobe AIR and Adobe Media Server?

    Adobe could essentially disapproves of many existing features requests and bug fixes related to video audio and solve many problems with WebRTC as:

    Implement the Opus Codec:

    https://BugBase.Adobe.com/index.cfm?event=selectBug & CFGRIDKEY = 3016518

    https://BugBase.Adobe.com/index.cfm?event=selectBug & CFGRIDKEY = 3331640

    https://BugBase.Adobe.com/index.cfm?event=selectBug & CFGRIDKEY = 3633142

    The problems of improved Microphone:

    https://BugBase.Adobe.com/index.cfm?event=selectBug & CFGRIDKEY = 3711062

    https://BugBase.Adobe.com/index.cfm?event=selectBug & CFGRIDKEY = 3521224

    Add support for AAC, HE - AAC v2 audio stream, allowing iOS to be an endpoint that can receive audio and video:

    https://BugBase.Adobe.com/index.cfm?event=selectBug & CFGRIDKEY = 3694393

    Add support for transmitting video H264 since an Android:

    https://BugBase.Adobe.com/index.cfm?event=selectBug & CFGRIDKEY = 3648262

    A decrease in video latency and performance on the Androids independently processors from Intel ARM 32-bit/64-bit

    https://BugBase.Adobe.com/index.cfm?event=selectBug & CFGRIDKEY = 3648268

    Improve the video quality and bandwidth:

    HEVC H265, VP9

    No there no updated day nor comment from Adobe regarding adding support for WebRTC. According to the roadmap for this year, they are reserved! It seems that we will not see WebRTC in the ActionScript platform this year unfortunately. In March, I made some predictions as to what might be considered a higher priority to Adobe to work on. It seems that this list is still being developed by the team of Adobe AIR/Flash. They have not yet finished iOS support 8, and they have several more months to get finished video hardware acceleration. VideoTexture is still in beta and will likely be in version beta version 19 very air I guess. Then AIR 64-bit runtime ends Q3 as well as improvements of HTML5 for the 4th quarter. It seems that Adobe is fully booked.

  • live streaming with Flash media server

    Hello

    I'll work on a live project streaming with Flash Media Server. The idea is to see the video of a user to several Viewer.

    I have a few questions.

    Which protocol should I use (PLMN, rmtfp, etc.).

    Is there a tutorial for that. Help, please.

    Amit

    You can use rtmfp to do all this.

    Start here: http://labs.adobe.com/technologies/cirrus/

  • The Adobe Media Server Installer does not run

    I'm trying to install Adobe Media Server 5 on Windows 2008 R2 64 bit on i3 logged on as user administarive RDP.

    The installation program just does not--a very short hourglass and then nothing.  No newspapers in application Setup System connects.

    The Group installation Adobe Media Gateway program works very well.

    Tried a reboot of the machine and still no go...

    Any ideas gratefully received

    Simon

    OK, had... come on properties on the file and 'unlock'

    It was because I downloaded on another machine and then copied on.  Windows 2008 knew that he had not been made locally and quietly blocked the execution.

  • Outlook express crashes when connecting with the mail server

    Outlook express 6 crashes when the connection with the mail server, please advise, thank you!

    Try to remove your e-mail account and then close and reopen OE and then add it back again.  Make sure that antivirus sofware interfering not - see www.oehelp.com/OETips.aspx#3

    Steve

  • Outlook express hangs after the connection with the mail server

    OE6 hangs after the connection with the mail server?

    Make sure that the other machine is not check that the server so often a machine is not problems because it cannot be verified.

    Try to delete the account, compact the folders and close OE and reopen it and add the account back again.  Also make sure that the antivirus software is not interfere (see www.oehelp.com/OETips.aspx#3).

    You can also telnet to the server directly from this computer to see if it works (see http://techhelp.santovec.us/pop3telnet.htm).

    Sometimes it gets stuck in a message on the server and it can not get downloaded by OE, so it may be necessary to remove the message from the server, but if the other machine got, maybe it's not the question.

    Steve

Maybe you are looking for