Flex app hangs at "Initializing..."

I wrote a flex 3 web application that works on two computers
(one using localhost, another remote host). I'm trying to get it to
work on a third but when I try and load it, before I can even use
the app, when loading it hangs at "Initializing..." and never moves
forward from there.
Anyone have an idea why it would work fine on two computers
but not the third? I thought maybe it was the environment of the
third computer, but yet basic flex applications work fine on it, it
just seems to not want to initialize this particular application.
Thanks!

quote:
Originally posted by:
justria
Me? I've seen the problem on Safari.
I've got the same thing on IE when anti-phishing filter is
turned on.
http://mitek.id.au/blog/2008/08/02/flex-debugging-session-is-stuck-at-the-loading-stageie- only/
Turning anti-phishing filter off for my local site fixed this
problem.
And I've got RSL libraries which I am dynamically loading and
sometimes they stuck as well at a later stage. And I can't find the
reason or solution for it so far. It happens only on a local site
(Apache 2.2.9 on Windows) and it never happens on production site
which runs same version of Apache under FreeBSD.
Actually, one thing improved the situation, but not fixed it
- I've added an empty event handler on preintialize event in the
loaded application component. The success rate improved from 2/10
to 5/10.
Cheers,
Dmitri.

Similar Messages

  • Flex App Hangs on Streaming FLV Seek

    Good afternoon all.
    In my current Flex 2 project, I'm switching our video
    playback components from using progressive download to streaming
    playback via FMS 3. Everything's working great and doing what it
    should, but occasionally when I perform a seek on a NetStream, my
    whole application freezes until the seek operation is complete.
    I was curious if there were places in my code that were
    causing the slowdown, so I created a very basic barebones version
    of the streaming player (one netconnection, one netstream, one
    flash.media.video component, and an HSlider as a timeline) and even
    then I was getting the freeze on seek.
    Is this behavior common, or should I perform more tests to
    see if there's a bottleneck somewhere? If it helps, FMS is
    currently being run on a somewhat overtaxed dev box - could that be
    causing the freeze as well?
    Thanks!
    --GC

    quote:
    Originally posted by:
    justria
    Me? I've seen the problem on Safari.
    I've got the same thing on IE when anti-phishing filter is
    turned on.
    http://mitek.id.au/blog/2008/08/02/flex-debugging-session-is-stuck-at-the-loading-stageie- only/
    Turning anti-phishing filter off for my local site fixed this
    problem.
    And I've got RSL libraries which I am dynamically loading and
    sometimes they stuck as well at a later stage. And I can't find the
    reason or solution for it so far. It happens only on a local site
    (Apache 2.2.9 on Windows) and it never happens on production site
    which runs same version of Apache under FreeBSD.
    Actually, one thing improved the situation, but not fixed it
    - I've added an empty event handler on preintialize event in the
    loaded application component. The success rate improved from 2/10
    to 5/10.
    Cheers,
    Dmitri.

  • Ebedded Flex app does not play automatically

    I have a flex app that is embedded in a web page.
    When the page loads for the first time the app does not run
    automatically but is in "loop" mode.
    In order to embed the application in the html page we have
    copied the html and javascript files that the Flex builder
    generates :
    AC_OETags.js, history.htm, history.js etc.
    This only happens the first time the page is loaded,
    subsequently it loads and plays automatically.
    I would be grateful is anyone has some insight here.

    Thanks for your answer, we found a similar workaround.
    We did the following:
    1) disable automatic starting of the SWF in the script that
    created the plugin by adding these parameters:
    "play", "false",
    "loop", "false",
    2) adding some own javascript to the template-html:
    var isMovieLoaded = false;
    function setIsMovieLoaded(){
    isMovieLoaded = true;
    function start(id) {
    var swf = document.getElementById(id);
    if (swf) {
    swf.Play();
    function playMovie(){
    if( !isMovieLoaded ){
    start( "${application}" );
    window.setTimeout("playMovie()", 3000);
    3) calling setIsMovieLoaded() via ExternalInterface from the
    loaded application when initializing:
    if (ExternalInterface.available)
    ExternalInterface.call("setIsMovieLoaded");
    This way when the application loads and plays correctly, the
    delayed call to playMovie in the html-template does nothing,
    because the flag isMovieLoaded was already set by the application.
    If that is not the case, the movie is explicitly startet via
    the start function.
    Thanky anyway :-)

  • Photoshop CS3 10.0.1 launch hangs while Initializing menus

    Can anyone please help me? Everything was fine yesterday, then today CS3 blew up. When I click to launch Photoshop CS3 Extended the application panel displays and starts listing what it's loading. Every time it reaches "Initializing menus..." the app stops responding.
    I've already performed a CS3 uninstall and then reinstall and then installed the patches, but the problem persists.
    Also, my Illustrator CS3 files will not longer open. The application becomes unresponsive. Illustrator will launch but will not open files. Problem was the same before I did the uninstall and reinstall of CS3. Problem still persists.
    This morning I had to repair my HD with Apple's Disk Utility. These problems with Photoshop and Illustrator were occurring before I repaired the disk--thought that might cure the problem.
    I'm using a PowerMac G5 dual 2 Ghz processor
    Mac OS X 10.5.2
    6 GB of RAM
    Any ideas on solutions?

    Hi - just had the same problem and found it was related to my printer...
    1. Run CS3 until it hangs (during Initializing Menus stage).
    2. Run Activity Monitor, find the CS3 process, and click the Sample Process button. In the call stack I noticed there were printer-related calls.
    3. Ran System Preferences and selected Print/Fax - it also hung.
    I had a networked printer configured.
    Then - to fix...
    1. Killed off everything.
    2. Disabled Airport.
    3. Ran System Preferences, selected Print/Fax, deleted my printer.
    4. Re-enabled Airport.
    5. Ran CS3 - worked straight away.
    Even if you don't have a printer problem the Activity Monitor step may help find out what CS3 is up to when it hangs.
    Hope this helps,
    Jon.

  • Client flex app for livecycle es2

    Hi all,
    I am working on developing Flex client app for LiveCycle ES2. I need to implement authentication&authorization services in flex app. As far as I know, there is no efficient way to implement it in Flex. (At least I have tried couple of example from forums, it did not work properly at all. Once the browser is refreshed, the application gets initialized again and the session get lost...)
    As far as I know, LiveCycle Workspace is a Flex app. After login to that application and once the browser is refreshed, the session state is kept. It seems session management is achieved for that application.
    Is there any way to handle the same in flex client app?..
    thanks in advanace

    Is there no answer to my question ??? OR I am at the wrong place ??
    Abhinav

  • Port flex app from tomcat to oracle oas

    any direction given will be appreciated. i have a flex 3 app up and running on my localhost. i'm using a local install of tomcat(6.0.18) and i'm also using blazeds(3.2.0.3978). this combined java/flex app is using remote objects connecting to a back end oracle db on a diff host. as i mentioned... this app runs fine on my local tomcat server. i'm looking for docs or direction to port this over to an oracle app server(10.1.3.4). i have exported my project as a war file... deployed it error free on my OAS 10.1..3.4 server. the app loads but fails to do any remoting with [RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 404: url: 'http:/*****/messagebroker/amf'"]. i'm not sure if there are config changes i need to make before export or after deployment on oracle app server.
    thanks
    -doug-

    All jars are inside war so no need to conf, look inside oracle all server logs for error 
    -- Sent from my Palm Pre
    On Apr 5, 2010 4:18 PM, msdawgs <[email protected]> wrote:
    thanks for the reply...
    url returns...404 Not FoundServlet error: An exception occurred. The current application deployment descriptors do not allow for including it in this response. Please consult the application log for details.
    let me take a step back... i have not done any initial config of this oracle app server for this particular application. do i need to get blazeds.jar and ojdbc14.jar over there first? then deploy?
    thanks
    -doug-

  • Flex apps will not run in Browser after install

    I am running IE 6 (Wintel) and have tried both installers for
    the most recent Flash player -- activeX and the other standalone
    one. I cannot view any Flex apps now in my browser - most notably
    the derby examples. It seems to hang on a screen that has the title
    "Flash Player Installation" -- like something in the apps is
    sniffing for the player, not finding it, and then hanging on some
    "automatic" install hook that has been built for Flex but not
    completely implemented yet. That is my suspicion, but I just want
    it to work -- do I need to uninstall/reboot/install again ? Any
    tips would be greatly appreciated as I need to start a Flex 2
    project next week. thanks.

    You definatately need to run the unistaller 1st. Also make
    sure that all IE browser are closed, and that nothing that could
    possibly be using IE functionality (things like outlook, file
    manager etc...) are not running or the uninstall may well fail.
    Once this is succefully accomplished, re-install.

  • Flex app doesn't work when moved from original location

    I'm trying to make an image gallery in flex. It works when I run it in Flex Builder perfectly fine. The html and swf files from the bin-debug folder work perfectly fine when opened in any browser also, but ONLY when those files and all related files are opened from the default location that the application was built in. When I export a build to a different folder, the swf loads but none of the information from the xml file displays. I tried setting all of the paths of the reference files (namely the xml) in the flex app to the exact absolute location on the server, and it still didn't work when I uploaded it to the server.
    I've tried several approaches starting from scratch and they have all come up with the same issue. I'm working with an educational license for Flex Builder, I'm not sure if they jip you on those and ruin the compiled swf.
    Please help! I'm losing my mind over this.I think it has to do with something else besides the code since it works fine when I hit "Run", but if anyone thinks it will help to post the code let me know.

    when you build an application using one of the wizards (like coldfusion flex application wizard) it hard codes
    paths to cold fusion CFC's, and sometimes gets it wrong.
    If your application references cfc's (or other remote objects) then it may be necessary to adjust the flex code
    when moving the code into a different base folder.
    For example in my own application, the url is http://localhost/crm_dev_flex and the built application gets put into
    c:\inetpub\wwwroot\crm_dev_flex\bin-debug
    References in the code to components found in c:\inetpub\wwwroot\crm_dev_flex\bin-debug\components\cfgenerated
    (in the flex code these looks like crm_dev_flex.bin-debug.components.cfgenerated.<mycomponent> )
    These need to change when you move the code to somewhere else.
    Also, if you are using wizard generated cfc's then these also contain similar references that need to be changed.
    IHTH.
    Cheers

  • File not Found Error in Flex APP-MDI

    Hi Friends,
    In my Flex APP-MDI application  have error.Th error is given blew.How can i solve this problem,please any one help to me.
    Error:
    File not found: file:/C:progmfiles/AdobeFlashBuilderBeta2/amdiBasicExample_1_1_1/bin-debug/amdiBasicExamp le.html
    Thanks,
    Magesh R.

    You would do better to ask this in the developer forum, not the user forum.

  • I have a production mobile Flex app that uses RemoteObject calls for all data access, and it's working well, except for a new remote call I just added that only fails when running with a release build.  The same call works fine when running on the device

    I have a production mobile Flex app that uses RemoteObject calls for all data access, and it's working well, except for a new remote call I just added that only fails when running with a release build. The same call works fine when running on the device (iPhone) using debug build. When running with a release build, the result handler is never called (nor is the fault handler called). Viewing the BlazeDS logs in debug mode, the call is received and send back with data. I've narrowed it down to what seems to be a data size issue.
    I have targeted one specific data call that returns in the String value a string length of 44kb, which fails in the release build (result or fault handler never called), but the result handler is called as expected in debug build. When I do not populate the String value (in server side Java code) on the object (just set it empty string), the result handler is then called, and the object is returned (release build).
    The custom object being returned in the call is a very a simple object, with getters/setters for simple types boolean, int, String, and one org.23c.dom.Document type. This same object type is used on other other RemoteObject calls (different data) and works fine (release and debug builds). I originally was returning as a Document, but, just to make sure this wasn't the problem, changed the value to be returned to a String, just to rule out XML/Dom issues in serialization.
    I don't understand 1) why the release build vs. debug build behavior is different for a RemoteObject call, 2) why the calls work in debug build when sending over a somewhat large (but, not unreasonable) amount of data in a String object, but not in release build.
    I have't tried to find out exactly where the failure point in size is, but, not sure that's even relevant, since 44kb isn't an unreasonable size to expect.
    By turning on the Debug mode in BlazeDS, I can see the object and it's attributes being serialized and everything looks good there. The calls are received and processed appropriately in BlazeDS for both debug and release build testing.
    Anyone have an idea on other things to try to debug/resolve this?
    Platform testing is BlazeDS 4, Flashbuilder 4.7, Websphere 8 server, iPhone (iOS 7.1.2). Tried using multiple Flex SDK's 4.12 to the latest 4.13, with no change in behavior.
    Thanks!

    After a week's worth of debugging, I found the issue.
    The Java type returned from the call was defined as ArrayList.  Changing it to List resolved the problem.
    I'm not sure why ArrayList isn't a valid return type, I've been looking at the Adobe docs, and still can't see why this isn't valid.  And, why it works in Debug mode and not in Release build is even stranger.  Maybe someone can shed some light on the logic here to me.

  • Deployment of Flex app to web and app server

    Hi
    I'm working on putting a Flex front-end on an existing J2EE
    app which gets deployed as an ear file. The architecture consists
    of web server, app server and database server. Is the following
    approach to deployment possible / recommended?
    My Flex app will be deployed to the web server. The J2EE ear
    file will be deployed to the app server (Weblogic). BlazeDS will be
    bundled within the ear file as a war file. Remote Objects will be
    configured in my BlazeDS configuration files to enable me to access
    the code in my J2EE app. In the compiler options of my Flex app,
    I'll be setting the server root folder and server root URL to point
    to the BlazeDS war file on my app server.
    At present I'm at the stage where I can run my Flex app
    directly from Flex builder on my development PC and it's able to
    connect tto the J2EE app, which is running on the app server
    (Weblogic) also on my development PC. I can't find documentation
    explaining how to extend this to work on a multi-tier architecture.
    Thanks
    David

    Hi,
    I replied to your post in FDS forum. Please visit the URL
    below for the response.
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=583&threadid=1373523
    Hope this helps.

  • Adobe AIR Needed on Android / iOS to Run Adobe Flex Apps

    Hi all,
    I want to confirm if the user has to install Adobe AIR before launching Adobe Flex apps on Android and iOS Devices. Is there any way that we could embedd Adobe AIR setup in the app file so that the user dont have to hastle in installing Adobe AIR.
    Taimur

    It gives you only three options:
    Signed packages for each target platform.
    Signed AIR package for installation on desktop.
    Intermediate AIRI package that must be signed later.
    For mobile apps, we need to select the first option to get the .apk and .ipa file as the second option would generate .air file. None of the options offer to package AIR runtime. Only the first option gives you the option on NEXT window to include the download link of AIR Runtime.
    If i am wrong, kindly point me to that specific checkbox.
    OR do i have to put Runtime.apk in the assets folder of my source code so that it gets packaged?

  • Flex App with remoting works on local Apache server - fails on production server

    Hi Everyone,
    I have a Flex app that uses Data Services. The application works correctly on my local Mac Server and Apache. When uploaded to my production CentOS server, the Data Services fail. When the app is done loading, the following error message comes up:
    Class "ModelsService" does not exist: Plugin by name 'ModelsService' was not found in the registry; used paths:
    : /www/html/mdubb//PHP2/bin-debug/services/
    #0 /var/www/html/mdubb/ZendFramework/library/Zend/Amf/Server.php(550): Zend_Amf_Server->_dispatch('getAllModels', Array, 'ModelsService')
    #1 /var/www/html/mdubb/ZendFramework/library/Zend/Amf/Server.php(626): Zend_Amf_Server->_handle(Object(Zend_Amf_Request_Http))
    #2 /var/www/html/mdubb/PHP2/bin-debug/gateway.php(73): Zend_Amf_Server->handle()
    #3 {main}
    Where getAllModels is a method of my custom ModelsService.
    I changed the Zend path in the amf_config.ini file so it references the correct directory. If I browse to gateway.php, it prompts to download the file, which I think is correct.
    I added in the config file the path to the services folder.
    I tried adding $server->addClass("ModelServices") in gateway.php, but it didn't like that.
    The file structure on the production server is the same as the local server (I litterally uploaded everything in my local web root), so I can't think of what would be differenet between the two.
    I have already pulled one all nighter trying to get this to run. Do you know what I should troubleshoot next?
    Thanks in advance,
    Ryan

    Hi,
    With reference to Lumira 1.15, the minimal SP we support is BI 4.0 SP6. Please upgrade at least to this. Everything is detailed in the PAM https://websmp107.sap-ag.de/~sapidb/011000358700001095842012E
    Best regards,
    Antoine

  • Loading purchased swf into Flash Builder 4 Flex app

    I have purchased a Flash "fundraising thermometer" from an online Flash components site. It takes input from an xml file and displays a thermometer with the goal at the top and the current amount raised indicated. It came with the following files:
    thermometer.swf
    thermometer01.fla
    thermometer01.html (A sample that works.)
    xml/thermometer.xml (The source file: goal amount, current amount, mark interval, etc.)
    caurina/transitions (Mostly .as files.)
    Since the test html (thermometer01.html) works fine, I thought this would be a no-brainer.
    I first unzipped the files into a "thermometer" folder in my current project. I then went into Flash Builder and created a SWFLoader object as follows:
    <mx:SWFLoader 
    id="myLoader" source="../thermometer/thermometer.swf" complete="initThermometer();" autoLoad="true" scaleContent="false"/>\
     private function initThermometer():void { 
         Alert.show('Thermometer loaded');
    The Design view looks fine. I can see the thermometer default image (see below).
    When I run the app, I get no errors, just a broken image link in a box (see below). The alert box also never shows up.
    I'm new to Flex, so I may be doing something stupid that keeps this from working. I contacted the author of the thermometer widget but he doesn't know anything about Flex.
    Any help figuring out how to get this to work in a flex app would be appreciated.

    You should probably add more event handlers to see what's going on.  Especially "ioError". The complete list is below.  For coverage, add a handler for each event. You can also use in MXML
         complete="initThermometer(event)
    and add an argument to your Actionscript method, to find out details about the event.
    private function initThermometer(event:Event):void { 
         Alert.show('Thermometer loaded ' + event.type);}
    Events
        complete="No default"
        httpStatus="No default"
        init="No default"
        ioError="No default"
        open="No default"
        progress="No default"
        securityError="No default"
        unload="No default
    General info here:
         http://livedocs.adobe.com/flex/3/langref/mx/controls/SWFLoader.html
    I did not test my code suggestions, but it's probably close.

  • Java Swing App hangs on socket loop

    H}ello everyone i've run into a bit of a snag with my application, its a simple chat bot right now but will evolve into a chat client soon. I can't do that however since my app hangs when i look through the readLine() function to receive data and i dont know how to fix this error. The code is below.
    The doSocket() function is where the while loop is if anyone can help me with this i'd be very greatful.
    * GuiFrame.java
    * Created on August 13, 2008, 9:36 PM
    import java.net.*;
    import java.io.*;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    * @author  brian
    public class GuiFrame extends javax.swing.JFrame {
        /** Creates new form GuiFrame */
        public GuiFrame() {
            initComponents();
        Socket client_sock = null;
        PrintWriter out = null;
        BufferedReader in = null;
        @SuppressWarnings("unchecked")
        // <editor-fold defaultstate="collapsed" desc="Generated Code">                         
        private void initComponents() {
            convertButton = new javax.swing.JButton();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            setTitle("Test Bot");
            convertButton.setText("Connect");
            convertButton.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    convertButtonActionPerformed(evt);
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGap(41, 41, 41)
                    .addComponent(convertButton)
                    .addContainerGap(42, Short.MAX_VALUE))
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGap(22, 22, 22)
                    .addComponent(convertButton)
                    .addContainerGap(26, Short.MAX_VALUE))
            pack();
        }// </editor-fold>                       
    private void convertButtonActionPerformed(java.awt.event.ActionEvent evt) {                                             
        if (convertButton.getText()=="Connect") {
                    String old;
                    try {
                        client_sock = new Socket("www.spinchat.com", 3001);
                        out = new PrintWriter(client_sock.getOutputStream(), true);
                        in = new BufferedReader(new InputStreamReader(client_sock.getInputStream()));
                    } catch (UnknownHostException e) {
                    } catch (IOException e) {
                try {
                    doSocket();
                } catch (IOException ex) {
                    Logger.getLogger(GuiFrame.class.getName()).log(Level.SEVERE, null, ex);
        } else if (convertButton.getText()=="Disconnect") {
            out.println("e");
            out.close();
            try {
                client_sock.close();
                in.close();
            } catch (IOException ex) {
                Logger.getLogger(GuiFrame.class.getName()).log(Level.SEVERE, null, ex);
    private void doSocket() throws IOException {
        BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in));
        String userInput;
        String old;
            while ((userInput = stdIn.readLine()) != null) {
                old = userInput;
                if (userInput != old) {
                    String proto = userInput.substring(0, 0);
                    if (proto == ":") {
                        out.println("{2");
                        out.println("BI'm a bot.");
                        out.println("aNICKHERE");
                        out.println("bPASSHERE");
                    } else if (proto == "a") {
                        convertButton.setText("Disconnect");
                        out.println("JoinCHannel");
        * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new GuiFrame().setVisible(true);
        // Variables declaration - do not modify                    
        private javax.swing.JButton convertButton;
        // End of variables declaration                  
    }Edited by: briansykes on Aug 13, 2008 9:55 PM
    Edited by: briansykes on Aug 13, 2008 9:56 PM

    >
    ..i've run into a bit of a snag with my application, its a simple chat bot right now but will evolve into a chat client soon. >Is this intended as a GUId app? If so, I would stick to using a GUI for input, rather than reading from the command line (which when I run it, is the DOS window that jumps up in the BG - quite counterintuitive). On the other hand, if it is intended as a non-GUId or headless app., it might be better to avoid any use of JComponents at all.
    My edits stick to using a GUI.
    Other notes:
    - String comparison should be done as
    s1.equals(s2)..rather than..
    s1 == s2- Never [swallow exceptions|http://pscode.org/javafaq.html#stacktrace] in code that does not work.
    - Some basic debugging skills are well called for here, to find where the program is getting stuck. When in doubt, print out!
    - What made you think that
    a) a test of equality on a member against which you had just set the value to the comparator, would logically lead to 'false'?
    old = userInput;
    if (userInput != old) ..b) A substring from indices '0 thru 0' would provide 1 character?
    String proto = userInput.substring(0, 0);
    if (proto == ":") ..
    >
    ..if anyone can help me with this i'd be very greatful.>Gratitude is often best expressed through the offering of [Duke Stars|http://wikis.sun.com/display/SunForums/Duke+Stars+Program+Overview].
    * GuiFrame.java
    * Created on August 13, 2008, 9:36 PM
    import java.net.*;
    import java.io.*;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.swing.*;
    * @author  brian
    public class GuiFrame extends JFrame {
        /** Creates new form GuiFrame */
        public GuiFrame() {
            initComponents();
        Socket client_sock = null;
        PrintWriter out = null;
        BufferedReader in = null;
        @SuppressWarnings("unchecked")
        // <editor-fold defaultstate="collapsed" desc="Generated Code">
        private void initComponents() {
            convertButton = new JButton();
            setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
            setTitle("Test Bot");
            convertButton.setText("Connect");
            convertButton.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    convertButtonActionPerformed(evt);
            GroupLayout layout = new GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGap(41, 41, 41)
                    .addComponent(convertButton)
                    .addContainerGap(42, Short.MAX_VALUE))
            layout.setVerticalGroup(
                layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGap(22, 22, 22)
                    .addComponent(convertButton)
                    .addContainerGap(26, Short.MAX_VALUE))
            pack();
            setLocationByPlatform(true);
        }// </editor-fold>
    private void convertButtonActionPerformed(java.awt.event.ActionEvent evt) {
        if (convertButton.getText()=="Connect") {
                    String old;
                    try {
                        System.out.println( "Connect start.." );
                        client_sock = new Socket("www.spinchat.com", 3001);
                        out = new PrintWriter(client_sock.getOutputStream(), true);
                        in = new BufferedReader(new InputStreamReader(client_sock.getInputStream()));
                        System.out.println( "Connect end.." );
                    } catch (UnknownHostException e) {
                        e.printStackTrace();
                    } catch (IOException e) {
                        e.printStackTrace();
                try {
                    doSocket();
                } catch (IOException ex) {
                    Logger.getLogger(GuiFrame.class.getName()).log(Level.SEVERE, null, ex);
        } else if (convertButton.getText()=="Disconnect") {
            out.println("e");
            out.close();
            try {
                client_sock.close();
                in.close();
            } catch (IOException ex) {
                Logger.getLogger(GuiFrame.class.getName()).log(Level.SEVERE, null, ex);
        private void doSocket() throws IOException {
            System.out.println( "doSocket start.." );
            String userInput;
            String old;
            userInput = JOptionPane.showInputDialog(this, "Send..");
            while(userInput!=null && userInput.trim().length()>0) {
                System.out.println( "doSocket loop 1.." );
                String proto = userInput.substring(0, 1);
                System.out.println("proto: '" + proto + "'");
                if (proto.equals(":")) {
                    System.out.println("Sending data..");
                    out.println("{2");
                    out.println("BI'm a bot.");
                    out.println("aNICKHERE");
                    out.println("bPASSHERE");
                } else if (proto.equals("a")) {
                    convertButton.setText("Disconnect");
                    out.println("JoinCHannel");
                userInput = JOptionPane.showInputDialog(this, "Send..");
            System.out.println( "doSocket end.." );
        * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new GuiFrame().setVisible(true);
        // Variables declaration - do not modify
        private JButton convertButton;
        // End of variables declaration
    }

Maybe you are looking for

  • How to I make it so apple can never email me on a certain email?

    I have forgotten my security question and just got a new mac, I need to buy something on my mac but since I can't remeber my security question I can't buy it, When I tell apple to email me how I can change it they email my email that doesn't work so

  • Tables for Purchase contract Tax pricing

    Hi ,      I want to display purchase contract detail in the standard layout. For Displaying pricing we need the Document condition number of the contract. Normally in Purchase order pricing document number is in EKKO table and field name is KNUMV. In

  • How do I add buttons/links in video

    Hello, I am new to editing video. I am looking to add a replay link and a go to url link once my movie plays through. I am using Flash CS3 pro. If someone could give me specific directions or direct me to a tutorial instructing me how to do this I wo

  • Nokia Should resolve the c3 video crash problem

    Hi friends. I just bought Nokia C3 on 8th November. Everything was okey until itried to play video. I just transfered some video files to my c3's 2gb memory card through Nokia PC Suite. After playing for 5 second the phone hanged and restarted. I tho

  • TV Tunner OS 9

    Is there a PCI TV tunner with RCA? Thanks