FMS auto disconnects when using a class

I am trying to implement a very simple class that will create
an instance of the NetConnection object and connect to the FMS
server. However, the client will connect then immediately
disconnect when the swf is published. My code is as follows...
FLA Code:
import _includes.*;
var obj_conn:Conn = new Conn();
obj_conn.connect();
Conn.as Code:
class _includes.Conn
public function Conn()
public function connect()
var nc:NetConnection = new NetConnection();
nc.connect("rtmp://localhost/classtest");
Please note that the connection works fine if I just create a
NetConnection variable on the FLA itself in the timeline. Any
suggestions/help would be appriciated!

it think this is happen because you use local variable : your
variable is delete at the end of connect() so your NetConnection
will be closed in the same time.
try this:
Conn.as Code:
class _includes.Conn
private var objNetCon:NetConnection;
public function Conn()
public function connect()
this.objNetCon = new NetConnection();
this.objNetCon.connect("rtmp://localhost/classtest");
}

Similar Messages

  • Some RST are seen during TCP disconnection when using SSL connection

    Some RST are seen during TCP disconnection when using SSL connection
    It is expected that the disconnection sequence for a secure connection to be as follow:
    client ************************* server
    --- alert (warning, close notify) --->
    <--- alert (warning, close notify) ---
    in any order;
    and then:-
    --------------- FIN, ACK ------------>
    <----------- FIN, ACK ---------------
    ------------------ ACK ----------------->
    Instead of the sequence described above, the TCP connection for a secure connection is closed with an RST.
    For instance, Wireshark capture shows that an SSL+SASL TCP connection is closed in the following manner:
    client ************************** server
    --- alert (warning, close notify) ---->
    ---------------- FIN, ACK ------------>
    <--- alert (warning, close notify) ---
    <----------- FIN, ACK ---------------------
    ------------ RST -----------------> *(This RST message should be investigated, an ACK message was expected)*
    Server: OpenLDAP: slapd 2.4.23
    Client: (java version "1.6.0_16")
    import javax.naming.*;
    import javax.naming.directory.*;
    import javax.naming.ldap.InitialLdapContext;
    import java.util.Hashtable;
    import javax.naming.ldap.InitialLdapContext;
    import javax.naming.ldap.StartTlsRequest;
    import javax.naming.ldap.StartTlsResponse;
    class Client {
    private static final String DEFAULT_INITIAL_CONTEXT_FACTORY = "com.sun.jndi.ldap.LdapCtxFactory";
    public static void main(String[] args) {
    //SSL
    try {
    System.setProperty("javax.net.ssl.keyStore", "c:\\\keystore");
    System.setProperty("javax.net.ssl.keyStorePassword", "adminadmin");
    System.setProperty("javax.net.ssl.trustStore","c:\\\keystore");
    System.setProperty("javax.net.ssl.trustStorePassword","adminadmin");
    // Set up environment for creating initial context
    Hashtable env = new Hashtable(11);
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
    // Must use the name of the server that is found in its certificate
    env.put(Context.PROVIDER_URL, "ldap://1.2.4.4:16415");
    env.put(Context.SECURITY_AUTHENTICATION, "simple");
    env.put(Context.SECURITY_PRINCIPAL, "cn=manager,dc=operator,dc=com");
    env.put(Context.SECURITY_CREDENTIALS, "password");
    env.put(Context.SECURITY_PROTOCOL, "ssl");
    // Create initial context
    InitialLdapContext ctx = new InitialLdapContext(env, null);
    // Close the context when we're done
    ctx.close();
    catch(Exception e)
    e.printStackTrace();
    Is it a bug ? Can I expect to have a patch for this issue?
    Regards,
    Olivier
    Edited by: 975464 on 6-Dec-2012 11:21 AM

    I agree it should be an ACK not an RST but it doesn't really matter. The connection is closed, and as neither the client nor the server has any pending data it is benign. Worth investigating in a later JRE.

  • Ichat, AIM, & Adium all frequently disconnect when using Air

    Ichat, AIM, & Adium all frequently disconnect when using Airport. I use a Linksys Wireless Router with an Airport extreme card. When directly connected to the router, I have no problem. Using a PC with Windows XP, AIM operates fine. Safari and Firefox work fine, although sometimes I receive errors connecting to pages, when I try again no problem. Using any of the chat programs, I lose connection, but then can reconnect. After a few times, the AOL servers will prevent login.
    I use COMCAST Cable internet service. My wireless router uses WEP encryption. I would switch to an AIrport Base station, but doubt it would correct the problem.
    I have had this problem previously, but it corrected itself. now it is making chat programs unusable.
    Any ideas?

    Hi John,
    By default Linksys units normally have the IP address of 192.168.1.1
    Is this true for both your units or have you changed one of them ?
    You may only find this out if you connect directly to the Modem one.
    Also you have not said if only one of them is doing DHCP.
    Example pic 3 on this page. This shows this device as getting it own contact IP address by DHCP (like from your ISP). Further down the page in the pic it shows the device is also acting as a DHCP server to the local net.
    If your router is set up like this it could be getting an IP address usng DHCP like this device shows and that would tend to mean that the Modem is acting as a DHCP server as well.
    If both devices still have the default IP addresses you will have conflicts, which probably explians the problems you have.
    Ralph

  • Detect Client Disconnect When using RTMP

    Hello,
    I hava a Java Server and Clients using RTMP. I've read somewhere that I can detect instantly client disconnection when using RTMP. However I cannot find an example code (in Java) that demonstrates this functionality? Can you help me please?

    I am not sure how your client looks, however the lient connect using NetConnection under the hood which spits NetStatusEvents's and you can listen to them ...
    C

  • Error Message When Using a Class Files to Control Navigation

    This is my first attempt at using a class file in a flash project. My intent is to keep all of my navigation elements in class file called "Navigation".  However, I keep getting an error message when I publish.
    I am using a button to go back to the main screen and I gave that button the instance name of "bnt_home". I have also linked that button in the library to the class "Navigation".
    Here is the code:
    package
        import flash.display.SimpleButton;
        public class Navigation extends SimpleButton
            public function Navigation()
                bnt_home.addEventListener(MouseEvent.MOUSE_DOWN, goNavigation);
            private function goNavigation(event:MouseEvent):void
                gotoAndPlay(1,"Main");

    When I changed the code I got error (1046: Type was not found or was not a compile-time constant: MouseEvent).
    package
        import flash.display.SimpleButton;
        public class Navigation extends SimpleButton
            public function Navigation()
                this.addEventListener(MouseEvent.MOUSE_DOWN, goNavigation);
            private function goNavigation(event:MouseEvent):void
                root.gotoAndPlay(1,"Main");

  • Problem when used InetAddress class in Applet

    Hi all.
    I'DongPG from Vietnam.
    I have a question'How to get IP that different from IP default "127.0.0.1" address'.
    I've built an applet where i used InetAddress class to get browser'IP follow:
    InetAddress localIP = InetAddress.getLocalHost();
    String strIP=localIP.getHostAddress();
    I used JBuilder to build applet. It's gotten IP right. Ex:strIP='192.168.100.1'
    But when i used browser link to my Applet in WebServer, it only return strIP='127.0.0.1'
    Thank a lot!

    Wrong forum and cross posted as well.

  • Avoiding attributes when using transform class

    Hi,
    One more help pls!!!!!
    When I use transform class and create an XML file, it creates with attributes for the nodes.
    For exapmle,
    <MessageOwner type="type" name="name">
    How do I avoid this type and name attributes?????
    Thanx and Regards,
    Gayathri.

    create a XSL that will not output the attibutes.

  • Network disconnects when using youtube on ipad air

    network disconnects and turns it self off when using youtube app on ipad air

    Hello paulm250m
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    iOS: Troubleshooting Wi-Fi networks and connections
    http://support.apple.com/kb/ts1398
    Wi-Fi disconnects or signal strength is less than expected
    Move closer to the Wi-Fi router (access point).
    Check for sources of potential interference.
    Remove any case, stand, or other accessories from your iOS device and see if signal strength improves.
    Reset network settings by tapping Settings > General > Reset > Reset Network Settings. Note: This will reset all network settings including
    previously connected Wi-Fi networks and passwords
    recently used Bluetooth accessories
    VPN and APN settings
    Best of luck,
    Mario

  • Passing argument to, when using one class for multiple assets

    I had a class that I was passing a simple argument to like so:
    var quiz_1_2:CaseStudyQuiz = new CaseStudyQuiz(2);
    addChild(quiz_1_2);
    I now would like to use this class for multiple MCs in my library. I thought I could let Flash create a class for each of them and specifying the CaseStudyQuiz class as the Base class. When I do that, I get the following error:
    1136: Incorrect number of arguments.  Expected 0.
    Obviously this is because the class created by flash does not except an argument. Does that mean, I would have to create a seperate class for each of the movies that use that class? And if so, what would I have to do in that class for it to except the parameter and pass it on to my base class?
    Thank you very much for any help with this!!!

    use the super() function and pass your parameter.  but you still might get a runtime error but i don't think that will cause a problem.

  • Compile error when using a class by fully-qualified name

    Hi... Is it an AS3 "feature" or a FB compiler bug that I cannot use a class without importing it?
    I have a statement such as
    if (de.codebank.util.StringUtilities.startsWith(status.name, phase.name+"_"))
    which does not compile until I import the StringUtilities class, which is pointless, of course.
    The compile error mentions an unknown property "util"

    I believe this is how AS3 works. Fully qualified class types require import statement.
    You use fully qualified name whenever you want to avoid ambiguity.
    However, when the code is like,
    import mx.collections.XMLListCollection;
    var arr:mx.collections.ArrayCollection;
    It works since compiler now understands that "mx.collections" is a package.

  • Is there anyway to stop the auto-refresh when using HsGetValue?

    Hi there
    I am just wondering if there is a way to stop the automatic refresh when opening a workbook that has HsGetValue functions? The issue I am having is that when you create a report in Smart View using the HsGetValue function, save it down, disconnect from Smart View then open it up again, it automatically tries to refresh the data. If you do not type your login, it just changes to #NEED REFRESH and you cant see the data anymore. This only happens when you have Smart View installed, if you are on a vanilla computer you can see the numbers no problems.
    The reason we dont want it to refresh is that we want to be able to view data at a point in time, instead of always refreshing to the latest data.
    I know that I can stop the refresh by changing Excel to Manual Calculation, instead of auto-calculation on formulas, but this isnt a viable solution as users arent used to manually pressing the Calculate button in Excel for their non Hyperion work.
    We are using 11.1.1.3 Planning and Essbase.
    Thanks!

    See this post Smart view first refresh
    Aside from turning auto-calculation off, you would need to copy the cells and paste them as values to get a static worksheet. This will eliminate any future refreshes.

  • How to get the log information when using a class?

    Hi All,
    I have a simple question, which I don't know how to solve. I am using org.apache.commons.logging.Log and LogFactory to do some logging. A typical situation is exemplified in the following code snippet.
    import org.apache.commons.logging.Log;
    import org.apache.commons.logging.LogFactory;
    class LogClass {
        private static final Log LOG = LogFactory.getLog(AClass.class);
        public void logit(){
            LOG.debug("This is the debugging log.");
    public class AClass{
        public static void main(String[] args) {
            LogClass l=new LogClass();
            l.logit();
    }But this way, I do not get the log information from the class LogClass. Could anybody please help?
    Many thanks.

    jschell wrote:
    jverd wrote:
    ...configuration in log4j.xml or log4j.properties.And far as I recall you need one of those two also. If there is no config then there is no output.I thought it used some default config if no file is present, but I could be mistaken. Either way, it adds to the possible problems that the OP could be having, any of which are consistent with his rather vague question.
    1) He's passing the wrong class to the LogFactory, and hence getting a logger with the wrong name, so he's seeing a different name than he expects in the output that's being produced.
    2) His config file does not contain the proper format to include the actual classname, independent of the logger's name, so he's missing a piece of desired information in each line of the output that's being produced.
    3) His config file indicates a threshold that's less verbose than the level at which his code is logging, so no output is present when he wants it.
    4) His config file is missing (or not where it's expected to be), so no output is being produced at all.
    5) His config file is missing (or not where it's expected to be), so a default level or format is being produced, effectively the equivalent of one of the misconfigurations described in #2 and #3.
    Since the OP seems to have vanished, we may never know.

  • Java.lang.InstantiationException when using Action class with constructor

    Hi everyone,
    I'm using the insertNewNode() method from this class in another action class, which works fine. But when this action itself is called, I get an infinite java.lang.InstantiationException (until the stack is overflowed). I'm initiating the fields required in every method in a constructor. If there is no constructor, this action works fine again. What's wrong?
    public class GliederungNewAction implements Action {
         private final String DEFAULT_DESCRIPTION = "Neuer Punkt";
         private OracleConnection connection;
         private String username;
         private String catalogue;
         private String attribute;
         private String parent_attr;
         private int parent_sequenceNr;
         private int requiredSequenceNumber;
         public GliederungNewAction(OracleConnection connection, String username, String catalogue) {
              this.connection = connection;
              this.username = username;
              this.catalogue = catalogue;
         public String perform(ActionMapping mapping, HttpServletRequest request,
                   HttpServletResponse response) {
              HttpSession session = request.getSession();
              // fetch the necessary parameters from the JSP site
              // the parent attribute is the selected attribute!
              parent_attr = request.getParameter("attr");
              catalogue = request.getParameter("catalogue");
              parent_sequenceNr = Integer.parseInt(request.getParameter("sort_sequence"));
              username = session.getAttribute("username").toString().toUpperCase();
              // connect to database    
              db.SessionConnection sessConn = (db.SessionConnection) session.getAttribute("connection");
              if (sessConn != null) {
                   try {
                        sessConn.setAutoCommit(false);
                        connection = (OracleConnection)sessConn.getConnection();
                        // insert the new node into DB
                        insertNewNode(DEFAULT_DESCRIPTION, parent_attr, parent_sequenceNr);               
                        connection.commit();
                        // set attributes for JSP post-action operations
                        request.setAttribute("attr", attribute);
                        request.setAttribute("parent_attr", parent_attr);
                   } catch(SQLException ex) {
                        if ( ex.getErrorCode() == 20001 ) {
                             return "error_edit.do";
                        } else { // for all other error codes, rollback and return general error page
                             try {
                                  connection.rollback();
                                  ex.printStackTrace();
                                  return "error_general.do";
                             } catch (SQLException e) {
                                  System.err.println("Rollback failed!");
                                  e.printStackTrace();
                                  return "error_general.do";
                             } // end of catch     
                        } // end of else
                   } // end of catch
              return mapping.getForward();
            // sample method
          * Creates, fills and executes a prepared statement to insert a new entry into the specified table, representing
          * a new node in the catalogue.
          * @param parent_attr TODO
          * @param parent_sequenceNr TODO
          * @throws SQLException
         public void insertNewNode(String description, String parent_attr, int parent_sequenceNr) throws SQLException {
                   requiredSequenceNumber = getRequiredSequenceNumber(parent_attr, parent_sequenceNr);
                   int freeSequenceNumber = getFreeSequenceNumber(requiredSequenceNumber);
                   int lastPosition = getLastNodePosition( getLastChildAttribute(parent_attr) );
                   attribute = createNewNodeAttribute(parent_attr, lastPosition);
                   String callAddNode = "{ call package.addNode(:1, :2, :3, :4, :5, :6, :7) }";
                   CallableStatement cst;
                   cst = connection.prepareCall(callAddNode);
                   cst.setString(1, username );
                   cst.setString(2, catalogue);
                   cst.setString(3, attribute);
                   cst.setString(4, parent_attr);
                   cst.setString(5, description);
                   cst.setInt(6, requiredSequenceNumber);
                   cst.setInt(7, freeSequenceNumber);
                   cst.execute();
                   cst.close();
    java.lang.InstantiationException: action.GliederungNewAction
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at action.ActionMapping.perform(ActionMapping.java:54)
         at ControllerServlet.doResponse(ControllerServlet.java:92)
         at ControllerServlet.doPost(ControllerServlet.java:50)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:431)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:355)
         at ControllerServlet.doResponse(ControllerServlet.java:103)
         at ControllerServlet.doPost(ControllerServlet.java:50)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         .......

    You're welcome.
    Still, I would report this as a bug at the Struts mailinglist/issuetracker. This silly behaviour shouldn't happen. Once an InstantiationException, okay, but in an infinite loop?!? That's definately a bug. Also the detail message may be more informative, e.g. "No default constructor found" or so.

  • T440p: internet disconnects when using BT mouse

    I have the 2x2 Thinkpad wireless card and when I use my bluetooth mouse the internet disconnects and I get a "limited connection". I have the latest drivers for everything.

    Hi iphetamine and Jakoob,
    Remember that this is users helping users here, moderated by volunteers like me. Although there is some Lenovo presence, they can't patrol the entire community. They do try to help with some of the broader issues.
    Any possibility you're in a marginal WiFi reception area, and Bluetooth interferes with it?
    I don't work for Lenovo. I'm a crazy volunteer!

  • Blutooth disconnect when using Skype, now completely fails to reconnect

    I have been experiencing the following problem when accepting or placing a video call through Skype. This never happens when running any other software. My system is an ideaCentre B520 with the stock Bluetooth keyboard and mouse using a Broadcom BCM2070 device running firmware 6.5.1.2700 and a Microsoft Bluetooth Enumerator with firmware 6.1.7601.17889.
    The Bluetooth mouse and keyboard disconnect during the call and will not pair or connect wit the computer (IdeaCentre B520). The only solution that I have found work, is to remove both devices from the device manager and reconnect with the physical Bluetooth buttons on the computer and the devices. I also un- and reinstalled Skype, but the problem continues, which might be a software issue.
    However, today the computer completely failed to pair and connect with the devices. The pairing dialogue is displayed after pushing the Bluetooth button on the computer. I am prompted to press the corresponding buttons on the mouse and the keyboard and the dialogue completes (code number for keyboard is entered) with the message that the pairing was successful, but drivers may need to be updated. The new drivers are installed for the HDI devices as indicated by the bubble and the grey Bluetooth window light the devices as connected. The Bluetooth box will then go into a repeated flickering between connected and disconnected until both devices are deleted from the device manager terminal. Both devices continue to blink as if searching for the receiver.
    I had to switch over to a wired mouse and keyboard to type these lines. But this defies the purpose.
    I sincerely appreciate any suggestion you might have to solve this problem and get the devices to talk to one another again.
    Thanks in advance.
    hailaender

    You use wrong bluetooth software. The only one that should work is 6.4.0.2100. You can download it from Sony website. I know it may sound strange but I have tested them all. Give it a shot and see what happens.

Maybe you are looking for