|
-
Please Help!!!
Hi all,
Please could ye help me out here. I have created a video conf. application using FlashMX2004 and Flash Communication Server MX.
But when I publish my application the following error appears in the output box:
**Error** Scene=Scene 1, layer=Actions, frame=1:Error opening include file chatroom.as: File not found.
Please could you help me remedy the problem. My chatroom.as file is located in C:\Program Files\Macromedia\Flash\Communication Server MX\flashcom\applications\ch18
This is its code:
// ActionScript Document
// 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://localhost/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
}
Also included in this folder with chatroom.as is Main.asc. Here is that code:
// ActionScript Communications Document
// 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
}
Any help would be greatly appreciated.
Thank you,
Kevin.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|