ActionScript 2.0 :: Use XMLSocket Class With Some Amount Of Server Code Included?
Nov 8, 2005simple Tutorial showing the use of XMLSocket class with some amount of server code included?
View 1 Repliessimple Tutorial showing the use of XMLSocket class with some amount of server code included?
View 1 RepliesI have installed FMS 3.5 on a Linux root server with openSUSE 10.3 without included Apache 2.2. That is why the webserver is already installed and running. Now I should know next steps to configure both FMS and Apache to make it work for streaming recorded .flv files via HTTP and the VOD application. Starting Apache manually after FMS server is running always ends up in failure and error message: 'Address already in use. Could not bind to address [::]:80. If I start Apache first and then FMS server everything is running. But I guess this is not correct because the manual mentioned first starting FMS server.
View 21 RepliesIm trying to use an AS3 modification of gskinner's collision detection class, but this being the first custom class i've ever tried to implement, i dont what i'm doing.How do i implement it into my flash? Do I just put it in the same folder as my .fla and .as?Do i have to initiate it in the main class?From what i understand it creates a rectangle, what would i need to turn it into a simple true/false?
View 2 RepliesI have a perl socket on my apache server that correctly takes input from sockets and sends it back out to every socket connected to the perl socket. I have tested the perl socket, and it works correctly.
When I launch the Flash in the IDE, as a flash program, it functions correctly with the perl socket.
However, when I try to launch the Flash in a Browser on my apache server, it tells me it is unable to connect to the server.However, I am seeing from feedback from my perl socket, the flash connects for about a half of a second, and thats it.
What could be the problem, do I have to include code in the flash to allow XMLSockets to connect in a browser as well? Is there certain things I need to do with my apache server to make it work?
Also if I 'Preview as HTML' from Adobe Flash CS4, it does not connect.
I have a server that I have written in Python and I'm trying to connect to it via Flash's XMLSocket. I know for sure that this server is working properly as I have used it successfully with multiple non-Flash client applications. For right now, I just want to connect to the remote server with an SWF residing on my local disk. From what I understand, this means that I do not need a security policy file since the SWF is not in another domain. I have also confirmed that the security sandbox property of the file is set to local-trusted, so the SWF should be able to connect to servers and retrieve data from them. Here's the important code from the AS file:
[Code]...
I have a Flash client that I want to connect to a server. Both are using localhost and port 50000 so there shouldn't be any cross-domain problems. I also set Access Network Only in the publishing settings. When I call the XMLSocket connect, the server seems to get a new connection. But, the XMLSocket.onConnect callback is not called with success=true.[code]...
View 2 RepliesI have two software to create with AIR: a server and a client. Both with AS3 and AIR.I want to avoid having a big architecture with Remote Shared Object, or using BlazeDS, or having to set a Java / Python / ... server in the middle.In order to avoid having to parse socket data in the server and in the client side, I thought about using XMLSocket on the client side: the data arrives in a way which is already parsed by the Flash framework.However, when I use this XMLSocket with the AIR ServerSocket, the "connect" event returns me a raw Socket on the server side. So I have to manually manage the XML data on the server side.
Is there a way to also use an XMLSocket on the server side to communicate with the client? A kind of trick to convert the returned Socket into an XMLSocket?If there is an AS3 library which manages that, I did not find it.
I'm trying to get an external script to communicate with an application instance running on my Flash Interactive Media Server installation. I've got the following server side actionscript in my AppStart():
[code]...
The connection to an open socket on the localhost, port 16005 works fine, but when I try to write some xml to the socket that I accepted the connection on (running on the localhost), I never seem to get the onXML or onData callbacks on the server application instance. One question that I had was regarding the NULL byte. If the FMS application doesn't not receive the NULL byte, does that mean the callback won't happen? If so, can someone tell me how to take something like a Python string and *add* a NULL byte so that the FMS will invoke the proper onXML or onData callback when this data is sent?
I've designed a flash [as2 php xmlsocket] chatroom , it works fine in localhost but i don't know how to run on real website server.I've uploaded the files but when i run the flash it can't establish a connection.What server requirements i need for xmlsocket?
View 0 RepliesTo rephrase my question: if you have a class with a bunch of static methods and you use one of them in your code, does the whole class get compiled with your movie? I suspect that it would be and, if that's the case, wouldn't it be better (from a file-size perspective) to use packaged functions instead?
View 3 RepliesI wanted to use the included video player from Flash media server but can't find a list of variables and values to pass to the player. Is there a list and could anyone point me in the right direction? I'm specifically looking to pass a stream name for a live stream to the video player.
View 6 Repliesi want to make an xmlsocket chatroom in my computer with wamp server ,i use this port and ip:
HTML Code:
mySocket.connect("localhost", 1026);
and i have changed the port of wamp server to 1026 and i have puted the socket.php file in www directory of wamp.when i run the swf file in flash the connection establishing is succesfull but when i try to send data the connection will close.this is the actionscript code:
HTML Code:
mySocket = new XMLSocket();
mySocket.onConnect = function(success) {
if (success) {
[code]....
I have a document class with functions that I want to access from .as files that are "included" from the timeline of movieclips.
for example, the Document Class "docClass.as":
PHP Code:
package{
public class docClass extends MovieClip
{
public function docClass():void
[Code].....
What is the correct way to call functions in the Document Class from and included .as file?
How to stream video over Socket Class (or XMLSocket) IN as3?
View 1 RepliesI would like to create a XML object and after this send it via XMLSocket class. The XML must have a special form:
Code: Select all<?xml version="1.0"?><Colour xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Value="red"/>
is it possible to send string to a class that isnt included in the same fla file.for example portfolio.fla is a main movie, it has an as file portfolio.as, work.fla is a secondary movie it has its own as file work.as, im loading work file into portoflio file and i want to pass a paramenter from portfolio.as to work.as
View 8 RepliesHow would one create custom class in Flash Media Server 4 in asc code file?[code]...
View 1 Replieshow do I get this code to repeat itself continually, because it just executes once. Im not that good with listeners, i know functions and variable etc though im not that bad.
Code:
if (health<=0) { gotoAndStop("mainDead");}
Its on a frame, not a MC.
[code].....
I have got the sound functionality working for two sounds in my embedded movie clip, each controlled by their own on-off button.I need to add this for another 20 or 30 sounds in the movie clip.I have the feeling there is a way of reducing the amount of code here using variables and/or arrays.
View 1 Repliespause the execution of my code for a set amount of time before resuming?
View 4 RepliesI've been trying to figure out FMS for about a week now. Because of company firewalls, all traffic must go through either port 80 or 443 (I configured this in FMS.ini). I also created a self-signed SSL certificate and configured the adaptor.xml file to use it. Nevertheless, here are the problems I am experiencing: For RTMPT & RTMPTE, I can't start more than 9 connections. Beforing configuring FMS to also use port 443, I could only get about 4 connections. Now I would like to say that I testing this between only two computers, the FMS server with apache web server and a client.why it will not at least start 10 connections which I know is the limit for the dev version? Also, when using RTMPS I can only start 1 connection. Why is that?
View 4 RepliesI have been having a serious issue with custom video where flash is saying that the amount of the video so far played is MORE than the amount that it has downloaded, which is clearly impossible. This results in various problems, such as the playhead (scrubber) moving past the end of the loader bar. I posted a simple demo that displays the amount loaded and the amount played in text fields. You can see it at: [URL][Code]...
View 5 RepliesSo I have been having a serious issue with custom video where flash is saying that the amount of the video so far played is MORE than the amount that it has downloaded, which is clearly impossible. This results in various problems, such as the playhead (scrubber) moving past the end of the loader bar.I posted a simple demo that displays the amount loaded and the amount played in text fields. You can see it at: URL...[code]I encoded the video at a high rate so that it would download slowly. It may not playback smoothly, which I am not concerned about. What I am concerned about is the numbers below the video what are derived from ns.bytesLoaded and ns.time. If you watch it for a bit, the amount played should exceed the amount loaded.
I double checked the video duration and the bytestotal that flash is reporting and they are correct. I don't know of any way to check the accuracy of bytesloaded.If your internet connection is super fast, you may not see the issue - it only occurs when it is playing back faster than it is downloading - if this is the case, you may need to throttle your speed down, or start downloading a large file while you are watching this demo in order to see the issue.But this is a serious issue and means that building custom video interfaces with loadbars and playheads is impossible!
I am within a class, "Enemy". This class has a function "collision". How can I communicate with the amount of lives a player has left from within this class?
View 1 Repliesi've made a button that zooms into a movie clip on a rollover, but it on moves it a certain amount each time you rollover the button. code below:
on (rollOver){
_root.Mypic._width += 5;
_root.Mypic._height += 5;
}
wot i want it to do is to continue zooming in for as long as the mouse is over the button, is there anyway i can change the code to zoom in at the same amount but do it continuously until the mouse is moved off the button. Also is there anyway that i can set it so that the zoom stops at a certain percentage, i.e. it only zooms in so much and then stops. What i mean is that the user can zoom in but the picture will only zoom in to say 200% of the original size.
If you have an .as file in the global include directory do you have to upload it to your server with the flash file or does it compile the flash file with the included info?
View 2 RepliesGot to the point where the hole in my AS3 knowledge is getting large!Realising I have confusion about the relationship of:Body of code on first frame of AS3 file.(Which I have so far used to create instances of library objects using addchild and make calls to class code).Is this code called the document code? What do people call it?Numerous classes linked together by extending each other etc.Library objects (usually graphical objects)Should it be done differently? have the following problems due to lack of understanding:Addchild complicated from a class but straight forward in main body code.Cant call functions on the main body code from classes, because class code does not know the main body code exists?
View 1 RepliesI had a 2 frame setup with some actionscript for each frame. Tried to move it all into one class file and a
1. frame .fla. ; Hiding and showing the resp. moviclips when i virtually move from frame 1 to frame
2. Now I get these ...Error #1069: Property edit_panel_mc not found on flash.display and there is no default value. errors or..
when i thought beeing clever adding the stage. prefix ReferenceError: Error #1069: Property edit_panel_mc not found on flash.display.Stage and there is no default value. The mc's are on the stage... i have a single .as classfile. Why cant I reference them? or how should i do it/ what should i do to change it from beeing .fla script to class script.
I see a lot of tutorials about coding actionscript 3 when they use all the code in a Class.I keep thinking every time why they use it in a class, instead of using actionscript on the stage.why it is more functional to code a class instead of putting code in the stage actionscript?
View 3 RepliesI want to learn multi-player programming with AS3.The backend code aspect I am hazy on. I need to write the server side code in something else other than AS3 with a regular web server? what are my options?vb.net socket programming consol app running on IIS?
View 4 Replies