Open dogslife opened 8 years ago
I just added a simple client and server in my fork. Instructions are here.
@chatziko wow, really appreciate you taking the time and effort. This looks great and I'll be trying it as soon as possible. Again. thanks
@chaziko apologies in advance if this comes across as obtuse or even banal but everytime I cd to sample and try and install express, as you instructed, I get the following
npm WARN flashsocket-sample@0.1.0 No repository field.
npm WARN flashsocket-sample@0.1.0 No license field.
Of course when I then run the server.js I get:
node server.js
module.js:341
throw err;
^
Error: Cannot find module 'policyfile'
at Function.Module._resolveFilename (module.js:339:15)
at Function.Module._load (module.js:290:25)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object.<anonymous> (C:\inetpub\wwwroot\FlashSocket\sample\server.js:6:18)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Function.Module.runMain (module.js:447:10)
I'm really hoping that this is the last time I bother you with something that is probably very trivial but thank you in advance for your continued support
that's not a problem, just warnings for missing fields in package.json.
On the other hand "policyfile" is not installed. Make sure that git is installed when you do "npm install" cause policyfile is retrieved from github (chatziko/FlashPolicyFileServer)
@ chatziko Sorry, I must have missed that. It took me forever to get it installed so I thought I'd share the following for the benefit of anyone else following in my wake.
npm WARN addRemoteGit Error: not found: git
The following link refers
[(http://stackoverflow.com/questions/19290899/git-is-not-installed-or-not-in-the-path/21614660#21614660 )]You'll no doubt be releived that I now have it running, I think npm start
flashsocket-sample@0.1.0 start node server.js listening to port 3000 open http://localhost:3000/ in your browser
I've done as prompted but the only indication I get is in firefox debug requesting URL: http://localhost:3000/client.swf - 404 not found But client.swf is actaully is there in my wwwroot so I'm confused My persistance only equals my frustration but I'm beginning to feel decididly stupid.
client.swf (compiled from client.as) needs to be put in the "sample" folder.
@ chatziko Oh my goodness it worked... I'm not entirely sure how I'm to impliment all this into the app I've created but I'm thrilled nonetheless. Its been a tumult 2 weeks learning all this and I don't profess to understand it all but thank you again for your continued support, patientce and help.
Hi guys,
I am facing a strange problem using @chatziko's lib. When testing on localhost everything worked OK. When I copied my project to a development server I am getting some strange errors:
TypeError: Error #1006: value is not a function. at MethodInfo-4() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at com.pnwrain.flashsocket.events::EventEmitter/_emit() at com.pnwrain.flashsocket::FlashSocket/onDecoded() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at socket.io.parser::Decoder/add() at com.pnwrain.flashsocket::FlashSocket/onData() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at com.pnwrain.flashsocket.events::EventEmitter/_emit() at com.pnwrain.flashsocket::Engine/onPacket() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at com.pnwrain.flashsocket.events::EventEmitter/_emit() at com.pnwrain.flashsocket::Transport/onPacket() at com.pnwrain.flashsocket.transports::Polling/onPollData() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/onComplete()
I have stripped down all my project and I used your client example also, still getting this error. The connection is created, I send my first package, on response I'm getting this error!
Do you have any ideas what could be the problem?
Thanks guys! You rock.
Hi guys,
its me again. Still couldn't figure out my problem. The other strange thing I have observed is that the next function in the Yeast class returns: undefined.1, undefined.2 and so on.
Could me problem be from a different swf version that I am building my project with?
Hi @chatziko. As suggested I've moved to Flash 11.2 and have made prgress. When first using the AS3webSocket code in your fork I got the following error: 1119: Access of possibly undefined property enableDeflateStream through a reference with static type com.worlize.websocket:WebSocket. Obviously when I comment the line //websocket.enableDeflateStream = true; it does compile and I am getting data transferring. The command prompt shows the following
but I then have a handshake issue and the connection drops. I'm alsmost certain that this handshake issue is a failing on my part but am not sure where. the error i get is
TypeError: Error #1009: Cannot access a property or method of a null object reference. at com.worlize.websocket::WebSocket/readServerHandshake()[WebSocket.as:793] at com.worlize.websocket::WebSocket/handleSocketData()[WebSocket.as:440]
What is it that I'm missing ?.. Please bear in mind that I am not a developer but am trying to learn and seeking your guidance. Also, would it be possible to share any simplified node.js/socket.io script you tested with. thanks in advance