Professional Web Applications Themes

PROB!PLEASE HELP - Macromedia Flash Actionscript

Hi all, When I test my flashmx2004 videoconf. application it just very briefly shows the login menu and the it stops and nothing is displayed. Please could you help me out here. It wrecking my head. Here is the actionscript code in my main flash app.: (frame1) #include "chat.as" (frame 6,11,16) stop(); (frame 7) mainLobby(); (frame 12) chatroom.connect( chatArea ); chatColor.connect( chatArea ); connectionLED.connect( chatArea ); bandwidth_mc.connect( chatArea ); peopleList_mc.connect( chatArea ); me_mc.connect( chatArea ); me_mc.setUserName( session.username ); p1_mc.connect( chatArea ); p1_mc.setUserName( session.username ); p2_mc.connect( chatArea ); p2_mc.setUserName( session.username ); userDisp.text = session.username; // show our username chatRoomDisp.text = activeRoom.room; ...

  1. #1

    Default PROB!PLEASE HELP

    Hi all, When I test my flashmx2004 videoconf. application it just very briefly
    shows the login menu and the it stops and nothing is displayed. Please could
    you help me out here. It wrecking my head.

    Here is the actionscript code in my main flash app.:

    (frame1) #include "chat.as"
    (frame 6,11,16) stop();
    (frame 7) mainLobby();
    (frame 12) chatroom.connect( chatArea );
    chatColor.connect( chatArea );
    connectionLED.connect( chatArea );
    bandwidth_mc.connect( chatArea );
    peopleList_mc.connect( chatArea );
    me_mc.connect( chatArea );
    me_mc.setUserName( session.username );
    p1_mc.connect( chatArea );
    p1_mc.setUserName( session.username );
    p2_mc.connect( chatArea );
    p2_mc.setUserName( session.username );

    userDisp.text = session.username; // show our username
    chatRoomDisp.text = activeRoom.room; // and chat room

    ==================================================
    ===================

    Here is my chat.as code:

    // ActionScript Doent
    // ChatRoom Application...

    // Joining a Room
    // Modifying the Roomlist Component to Join a Room without going to a new page
    (which is the current behaviour of the RoomList Component)

    FCRoomListClass.prototype.joinRoom = function()
    {
    var selectedRoom = this.rooms_lb.getSelectedItem().data;

    // Put our selected room data in a global variable
    _global.activeRoom = this.so.data[selectedRoom];
    this.so.data[selectedRoom].users++; // add a user to the room

    enterRoom(); // call our local function
    }

    // Initialization

    _global.session = new Object();
    _global.ourURL = "rtmp://ch18"; // CHANGE THE URL TO MATCH YOUR FlashComm
    Server!!!

    // Create our NetConnection objects to be used by our two areas

    loginArea = new NetConnection();
    chatArea = new NetConnection();

    // Main Login Handler - called when the login button is clicked (simplified
    for the context of our book)

    // login = function()
    loginBtn.onRelease = function()
    {
    _global.session.username = loginDisp.text; // get our text from our text box -
    will be used globally
    loginArea.connect( ourURL + "login", session.username ); // make the
    connection with our username
    gotoAndPlay( "rooms" ); // we're in - so select a room to chat in
    }


    // Logout Handler -- we're leaving when this button is clicked
    // logout = function()
    logoutBtn.onRelease = function()
    {
    loginArea.close(); // close our connection
    gotoAndPlay( "login" );
    }

    // Leave a Chat Room Handler -- called when we choose to leave a chat room
    // leaveRoom = function()
    leaveRoomBtn.onRelease = function()
    {
    if( chatArea.isConnected )
    {
    chatArea.close(); // only close the connection if we are in a room
    }

    _root.gotoAndPlay( "rooms" );
    }

    // called from our "rooms" Frame on the timeline
    mainLobby = function()
    {
    if( !loginArea.isConnected )
    {
    loginArea.connect( ourURL + "login", session.username ); // re-connect if we
    disconnected before
    }

    meetingRooms.connect( loginArea ); // connect our rooms list component and
    display our rooms

    if( activeRoom != undefined )
    {
    meetingRooms.so.data[activeRoom.id].users--;
    _global.activeRoom = undefined;
    }
    }


    // Enter Room Handler -- called when a room is selected from our component

    enterRoom = function()
    {
    loginArea.close(); // close our connect to the login / room selection area for
    now
    chatArea.connect( ourURL + activeRoom.id, session.username ); // connect to
    our chat room!

    _root.gotoAndPlay( "chat" ); // and start chatting away
    }

    ==================================================
    ===================

    Here is my main.asc code:

    // ActionScript Communications Doent
    // This file gets loaded up to the Flash Communications Server area

    load( "components.asc" );

    application.onConnect = function( client, newUserName )
    {
    gFrameworkFC.getClientGlobals(client).username = newUserName; // Our FlashCom
    Server puts the user name in the client's username variable
    application.acceptConnection(client); // allow the user to proceed
    }

    ==================================================
    ====================

    Please could you help me solve this problem. I would be very very grateful for
    your help and time. Thanks again,

    Kevin.



    obrienkev Guest

  2. #2

    Default PROB!PLEASE HELP

    Hi all, When I test my flashmx2004 videoconf. application it just very briefly
    shows the login menu and the it stops and nothing is displayed. Please could
    you help me out here. It wrecking my head.

    Here is the actionscript code in my main flash app.:

    (frame1) #include "chat.as"
    (frame 6,11,16) stop();
    (frame 7) mainLobby();
    (frame 12) chatroom.connect( chatArea );
    chatColor.connect( chatArea );
    connectionLED.connect( chatArea );
    bandwidth_mc.connect( chatArea );
    peopleList_mc.connect( chatArea );
    me_mc.connect( chatArea );
    me_mc.setUserName( session.username );
    p1_mc.connect( chatArea );
    p1_mc.setUserName( session.username );
    p2_mc.connect( chatArea );
    p2_mc.setUserName( session.username );

    userDisp.text = session.username; // show our username
    chatRoomDisp.text = activeRoom.room; // and chat room

    ==================================================
    ===================

    Here is my chat.as code:

    // ActionScript Doent
    // ChatRoom Application...

    // Joining a Room
    // Modifying the Roomlist Component to Join a Room without going to a new page
    (which is the current behaviour of the RoomList Component)

    FCRoomListClass.prototype.joinRoom = function()
    {
    var selectedRoom = this.rooms_lb.getSelectedItem().data;

    // Put our selected room data in a global variable
    _global.activeRoom = this.so.data[selectedRoom];
    this.so.data[selectedRoom].users++; // add a user to the room

    enterRoom(); // call our local function
    }

    // Initialization

    _global.session = new Object();
    _global.ourURL = "rtmp://ch18"; // CHANGE THE URL TO MATCH YOUR FlashComm
    Server!!!

    // Create our NetConnection objects to be used by our two areas

    loginArea = new NetConnection();
    chatArea = new NetConnection();

    // Main Login Handler - called when the login button is clicked (simplified
    for the context of our book)

    // login = function()
    loginBtn.onRelease = function()
    {
    _global.session.username = loginDisp.text; // get our text from our text box -
    will be used globally
    loginArea.connect( ourURL + "login", session.username ); // make the
    connection with our username
    gotoAndPlay( "rooms" ); // we're in - so select a room to chat in
    }


    // Logout Handler -- we're leaving when this button is clicked
    // logout = function()
    logoutBtn.onRelease = function()
    {
    loginArea.close(); // close our connection
    gotoAndPlay( "login" );
    }

    // Leave a Chat Room Handler -- called when we choose to leave a chat room
    // leaveRoom = function()
    leaveRoomBtn.onRelease = function()
    {
    if( chatArea.isConnected )
    {
    chatArea.close(); // only close the connection if we are in a room
    }

    _root.gotoAndPlay( "rooms" );
    }

    // called from our "rooms" Frame on the timeline
    mainLobby = function()
    {
    if( !loginArea.isConnected )
    {
    loginArea.connect( ourURL + "login", session.username ); // re-connect if we
    disconnected before
    }

    meetingRooms.connect( loginArea ); // connect our rooms list component and
    display our rooms

    if( activeRoom != undefined )
    {
    meetingRooms.so.data[activeRoom.id].users--;
    _global.activeRoom = undefined;
    }
    }


    // Enter Room Handler -- called when a room is selected from our component

    enterRoom = function()
    {
    loginArea.close(); // close our connect to the login / room selection area for
    now
    chatArea.connect( ourURL + activeRoom.id, session.username ); // connect to
    our chat room!

    _root.gotoAndPlay( "chat" ); // and start chatting away
    }

    ==================================================
    ===================

    Here is my main.asc code:

    // ActionScript Communications Doent
    // This file gets loaded up to the Flash Communications Server area

    load( "components.asc" );

    application.onConnect = function( client, newUserName )
    {
    gFrameworkFC.getClientGlobals(client).username = newUserName; // Our FlashCom
    Server puts the user name in the client's username variable
    application.acceptConnection(client); // allow the user to proceed
    }

    ==================================================
    ====================

    Please could you help me solve this problem. I would be very very grateful for
    your help and time. Thanks again,

    Kevin.



    obrienkev Guest

Similar Threads

  1. Strange prob
    By Vishal in forum ASP.NET Data Grid Control
    Replies: 3
    Last Post: December 16th, 06:54 PM
  2. AS2.0 prob
    By findapollo in forum Macromedia Flash Actionscript
    Replies: 2
    Last Post: February 18th, 08:26 AM
  3. login Prob
    By josephrthomas in forum ASP Database
    Replies: 2
    Last Post: December 30th, 10:49 PM
  4. [PHP] newbY prob
    By Jennifer Goodie in forum PHP Development
    Replies: 2
    Last Post: July 23rd, 07:56 PM
  5. newbY prob
    By Kevin Stone in forum PHP Development
    Replies: 0
    Last Post: July 23rd, 07:48 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139