Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Shockwave causes crash on htm page using SMUS

Shockwave causes crash on htm page using SMUS

Shockwave causes crash on htm page using SMUS

I am currently working on a multiuser chat program that is to be embedded into a webpage. I am running into a problem though after the program connects to the server. For the most part it works fine during run mode, but when you try to quit the program by closing the window, going to another website, or in any other way that I've found causes the browser to crash (the standard Internet Explorer has encountered a problem and needs to close error) When I click for more information on the error it lists dirapi.dll as the source of the problem. Dirapi.dll is part of shockwave, so I can't be sure if it's just saying that shockwave in general crashed or shockwave overall crashed, but in any case, it lists it as the problem.
I've tried everything I can think of to solve this problem and I just can't figure it out. I've tried rerouting all xtras to local files, tried a whole lot of things to clear globals and connections before quitting, letting the movie just run out into nothingness... I'm out of ideas. Your help would be greatly appreciated


RE: Shockwave causes crash on htm page using SMUS

Update: I've found that the actual problem lies somewhere in the "errCode = sConnect.SetNetMessageHandler( #DefaultMessageHandler, script 1 )" line - I'm not sure how to get around this problem as I need the NetMessageHandler in order to communicate with the server (unless there's some other way that I'm not aware of to do the server/client communication)

Again, your help would be greatly appreciated!

RE: Shockwave causes crash on htm page using SMUS

(I apologize for the triple post, but I can't seem to find an edit button anywhere..)

Upon even further research I have determined that the actual error occurs once a sendNetMessage command is sent to the server from the client. (for example, if I were to run the following code on the client in the browser it would cause the crash when you quit the game):

errCode = sConnect.sendNetMessage([#recipients:"system.script", #subject:"LoadChar",#content:AcctDat])

Is there a way to clear it somehow in the on stopmovie method?

RE: Shockwave causes crash on htm page using SMUS

Here's the script I'm using. Perhaps one of you can find a problem with it that will solve the problem.

global sConnect, MuteCountdown
on stopmovie
  sConnect = 0
end stopMovie

on DefaultMessageHandler
  global sConnect, uname, passphrase, IAmAdmin, IAmMod, IAmGuide, MuteCountdown
  newMessage = sConnect.getNetMessage()
  errCode = newMessage.errorCode
  if errCode <> 0 then
    alert "Error: "& errCode & " : " & sConnect.getNetErrorString(errCode)  
    if newMessage.Subject = "OkayToLog" then
      play frame 30
    end if
    if newMessage.SenderID = "System" AND newMessage.Subject = "ConnectToNetServer" then
      play frame 5
    end if
  end if

-- LoadMeUp
-- Command lines that run when the login button is pressed
-- Creates the multiuser xtra instance and the connection to the server.
on LoadMeUp
  set uname = field (member "username" of castlib "Internal")
  set passphrase = field (member "password" of castlib "Internal")
  sConnect = new(xtra "Multiuser")
  errCode = sConnect.setNetMessageHandler(#DefaultMessageHandler, script 1)
  errCode = sConnect.ConnectToNetServer( uname, passphrase, "server.theserv", 1626, "MainMovie" )
  play frame 4

-- LoadCharacterCommand
-- The script below is the problem causer. I'm not sure how to clear it
-- in the on StopMovie command.
on LoadCharacterCommand
  set uname = field(member "Username" of castlib "Internal")
  set passphrase = field(member "Password" of castlib "Internal")
  set CharDt = uname & ":" & passphrase
  -- The Commented line below is how I would normally send a command like this, the one below is how I have it set now, it makes no difference which I use. They both cause the crash in the end.
  -- errCode = sConnect.sendNetMessage([#recipients:"system.script", #subject:"LoadChar", #content:CharDt])
  errCode = sConnect.sendNetMessage("system.script", "LoadChar", CharDt)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close