PHP :: Flash Browser Game - Real Time Data Exchange
Feb 16, 2011
I am developing a non-real time browser RPG game (think Kingdom of Loathing) which would be played from within a Flash app. At first I just wanted to make the communication with server using simply URLLoader to tell PHP what I am doing, and using $_SESSION to store data needed in-between request. I wonder if it wouldn't be better to base it on a socket connection, an app residing on a server written in Java or Python.
The problem is I have never ever written such an app so I have no idea how much I'd have to "shift" my thoughts from simple responding do request (like PHP) to continuously working application. I won't hide I am also concerned about the memory and CPU usage of such Server app, when for example there would be hundreds of users connected. I've done some research. So, considering the fact I don't need real time data exchange, will it be wise to develop the server side part as socket server, not in plain ol' PHP?
View 1 Replies
Similar Posts:
Apr 7, 2010
I'm noticing some unexpected behavior. Some time in the last few months, a change in either Firefox, the Flash player, or both, has made it so that Flash movies that are in inactive browser tabs no longer execute in real time. They appear to still execute, but only in bursts, and not in a predictable way. This is a problem because I develop a Flash-based (Actionscript 2.0, Flash CS3) multiplayer game that maintains a network connection and allows players to chat, etc.
[Code]...
View 2 Replies
Oct 16, 2009
I have created real-time data loading flash file. I'm loading realtime data in dynamic text filed using variable. From JavaScript, I'm pushing the data into those dynamic text fields with 10 seconds interval.
Now I want to animate the dynamic text fields when the new data load into the text filed.
View 5 Replies
Jun 12, 2010
How does the url of FMS real time video stream look like?
View 1 Replies
Aug 15, 2011
I am a pretty big newb- my challenge is get a flash page to look to a database and check for updates constantly (in the realm of 1update/second) then pull new data as it is added.
View 1 Replies
Mar 26, 2012
I want to build an android application that visualize some real time data , to get the position of objects and update it in real time and give me a simple animation . studied OpenGL ES for couple of days but it seems quite complicated but I dont think it fits to my needs
View 1 Replies
Apr 6, 2010
The component itself receives all its parameters from a .txt file. The editor is a read/save form that initially loads the parameters into it's form fields, and then overwrites the .txt file when the user hits submit. You then refresh the component on whatever website you have it to see the changes.Here's the php code that I found to get me going:
<?php //Capture data from $_POST array $title = $_POST['Title']; $comments = $_POST['Comments']; $image = $_POST['Image'] //Make one big string in a format Flash understand $toSave = "Title=".$title."&Comments=".$comments."&Image=".$image;
[code].....
View 2 Replies
Sep 25, 2007
I want to design a component for retrieving real time data. A service schedule that displays a variety things:
Customer I.D.
Schedule time for service
Service type
Whether that service is delayed or on -time
Service completed
This would be displayed on the website.
Now to my question, would Flash Professional 2004 be the appropraite environment ( application ) to do with
View 2 Replies
Mar 12, 2012
I made a game as the same site URL..Anyone knows how to prevent user open and play game on multiple browser windows at a time?I used flash control to embed flash into aspx page and connect to sql server
View 4 Replies
Aug 29, 2009
I was looking for data to be transferred from ASP.NET page to Flash CS3 with actionscript 3.0
View 5 Replies
Nov 6, 2010
I've been struggling with this for a few weeks, but I still can't get it right, and all the info I found is too ambiguous or uses AS2. What I want to do is to retrieve info from a MySQL database, using PHP, and send it to Flash; and in the other way, input info into the database from a Flash form. I want this to make a series of Flash tests for my website. show me a simple example code (on both PHP and Flash) of how to exchange data? PD: I know how to work with databases on PHP, so the only PHP code i need to see is the php-flash communication part.
View 3 Replies
Jan 17, 2008
i'm remodeling a website i've done ([URL]). i want to exchange information between XML and Flash files. i almost did it, but where shoul display information about one item, the whole content of this 'field' is shown. i'll explain better. this swf displays works of an artist. but the field 'date' (or any other text field) display the content of all works (separated by commas). i'll post the xml code and the actionscript code.
View 2 Replies
Aug 21, 2008
We're currently building a fairly big dynamic website, and I was wondering if there was a way to have an animation that updates and move in real time as there's action on the site. Ex. red bulbs light up each time a user posts something on the forum or whatever. It'd be all related to the mysql database.
View 1 Replies
May 30, 2009
I'm looking to create something within Flash that I've not yet seen done.It will be a shared, real-time interactive session. What I want to know is, is it possible to create an individual, private session within Flash that is synchronized between two or more computers? I am doing this for the medical profession, but I can also see this would have benefits in the gaming community as well. I'm trying to create something that two specific users can interactively share in real time.
For example,a coloring book.Two players,or as many as you want, log in together and share a private coloring session. They will be able to interactively see anything that the other person is coloring in real time.The other people would also be able to color and let everyone else see their work.
View 1 Replies
Jan 3, 2008
I want to do a flash that changes based on the time of day. For example to load right .swf on container MC at the right time of the day.
View 1 Replies
Sep 28, 2010
Is it possible to create a flash character that can speak in real time?I want to create some characters that use the speech from my pc microphone (e.g. as I speak into my mic the character uses my voice to speak.
View 1 Replies
Jan 27, 2010
Flash can use the RTMP protocol to exchange data between a server and a client. How do you typically access this functionality in AS2 or AS3/Flex? For example to use sockets you use the XMLSocket (AS2) or Socket (AS3) classes. Does the server-side RTMP software use Sockets under the covers? or is it HTTP with tunneling?
The Real-Time Messaging Protocol (RTMP) was designed for high-performance transmission of audio, video, and data between Adobe Flash and a server. RTMP is now available as an open specification to create products and technology that enable delivery of video, audio, and data in the open AMF, SWF, FLV, and F4V formats compatible with Adobe Flash Player.
View 1 Replies
Oct 28, 2008
One thing that's really frustrating me about Flash is that the info panel doesn't display real-time width or height values.So if I'm drawing a rectangle, I can't just draw it out as do in Photoshop to say 400 X 200. I'll need to set this manually after I draw a small box.
View 2 Replies
May 25, 2011
I am creating a game where I have some red balls on the screen and some blue balls on the screen and I would like to draw a polygon around all balls of the same color and have this polygon automatically fill as soon as the polygon shape is closed. How to achieve this as I haven't really done much with the drawing API before. My current code will allow me to draw a polygon and for it to fill when I release the mouse but what I would like it to do is automatically fill as soon as the shape is closed.
Here is my code so far
Code:
var graphix = new MovieClip();
addChild(graphix);
var points:Array = [];
stage.addEventListener(MouseEvent.MOUSE_DOWN, startDrawing);
[Code] .....
View 2 Replies
Jul 13, 2009
I'm trying to playback some sample data through the new real-time audio capabilities of Flash Player 10. I started with the example given at the bottom of this page on livedocs, which seems to work fine and plays a crystal clear tone.I assume that the two writeFloat's in the example write to the left and right audio channels respectively and that the data being written is 32 bit (because of the float).
However. I seem to be having trouble converting my old 8 bit audio data to a format that is understood by this interface. When I playback my sample data I can vaguely hear the sound I'm expecting but it is massively distorted. My sample data consists of raw 8 bit samples that ranges from 0..255 where 127 is silence.
I've been trying different conversion formulas but I seem to be missing some vital information regarding this conversion.
UPDATE:The correct formula turns out to be:
f = (sample.data.readByte() - 127) / 255
View 2 Replies
Nov 18, 2010
Here is my problem: We are broadcasting sportevents live to the internet via flash media encoder.At the event locations we mostly have just 2 mbit upstream. So at the moment we are streaming with about 1mbit rate.But we need also streams for mobile-devices and a stream for users without fast internet. So we want 2 more streams with lower-bitrates,but we can't get this through the 2mbit...I am looking for a solutiuon which can transcode about a 1mbit(and may be in the future a 1.5mbit) livestream in to two (or more)lower-bitrate streams.The solution should be scalable,because sometimes we have 7 events at one day on different locations,so there could be 7 input-streams.I've searched the net for hardware transcoders, but didn't find a stable solution and I've tested also transcoding with ffmpeg, but it seems to get problems with timing and key-frames for bitrate switching.
View 3 Replies
Sep 23, 2011
I'm working in an educational software, mostly developed using Flash AS3, and we have a chronometer which shows different values through different users. Example: Two users starting the chronometer at same time, but along some minutes of usage, they have different values.
The current implementation uses Timer class, causing this to happen, obviously due the different average speed of each computer.
View 1 Replies
Sep 23, 2010
I am looking for a watch expression debugger for Flash AS3 (not flex). I have found this: demonsterdebugger but the refresh is not in real time (like the trace does), it has a lag of 3 seconds. It is important because i am developing a flash box2d game so I need the coordinates while playing.I've tried also KapInspect with the Digiex pluging, but it gets down the framerate and it is embebbed. So it is not good for me. Can you please tell me one good debugger? I am using Flash Builder 4 (it has not whach expression inspector)
View 1 Replies
Nov 3, 2010
I'm attempting to code a system to handle real-time refraction and reflection of light in 2 dimensions (on an x, y Cartesian plane, basically) and I'm hitting my head against the wall even figuring out where to start on this. My concept for how this should behave goes like this: There is an object that shoots a ray of light (a laser beam or something) toward a target object. When the ray intersects with the surface of the target, somehow I need to find the normal vector to the surface of the shape at the point of intersection and apply some equations from first year physics to alter the path of the ray appropriately. The same refraction effect takes place as the ray exits the object. At the moment, I'm grasping for straws. I'm not even sure what kinds of objects exist in Flash's libraries that will work for me with this. The existing libraries for shapes won't let me create lenses like I want to, and I'm not sure what I'll need to make for an adequate "light" projectile or line to take on this behaviour.
View 11 Replies
Nov 24, 2010
I want to draw stock price in real time as a candle graph. I get open flash chart from someone and it looks good at drawing. I don't know how to update the candle graph in real time (using Ajax?), and is it a good way? I use Python a lot. But I cannot find tools as easily to use as OFC.
View 3 Replies
Jan 27, 2011
I'm streaming audio using NetConnection and NetStream. I know that you can modify sample data in real-time with the Sound object, however I cannot find the SampleDataEvent for audio playing with the NetStream object. Is there a way to pass the audio from the NetStream object to a Sound object and modify the sound at that object instead?
View 2 Replies
Jul 9, 2009
i'm creating a very linear game which will be dialogue-heavy. In fact, there will be little action involved at all. Think a game storybook. I'm using ActionScript 2 because AS3 is just too complicate for the type of newbie that I am. But all I'm trying to do is set up dialogue between two characters in my game with an image of the speaking character to the left of the textbox. Something very much like this:I considered creating arrays for the dialogue but my problem is that if I create an array for every time two characters exchange three lines of dialogue, I would end up with over 300 arrays. Not my cup of tea.
So, instead, I focused on this. I created a function called speak. Speak pulls two parameters: charNum and charText. CharNum is a number which specifies which frame of the charPic instance should be displayed, showing which character is currently speaking. CharText is simply the dialogue the character will speak, which will be displayed in the dynamic textbox with variable name 'dialogue'.The following code is an example of what I have at home. I'm at work trying to get help, so I don't have the actual coding. Therefore, small errors may be present. I'm looking more at the overall functions guiding my code.
[Code]...
You see, AS2 sees these as I believe what is called synchronous functions, meaning they run at the same time. Therefore, the second speak function overwrites the first one before the user presses the space bar to go to the next one. See the issue?I've tried to seek help on this issue (and other before), and I keep getting told about arrays and setInterval. But my problem is that I've tried it all. I don't see a good array tutorial about this type of thing, and setInterval doesn't function like I'd want as well. Instead, it seems that from what I've read and tried, setInterval is for setting a delay up for a certain amount of time. I don't want that. I want a delay to occur until a button (namely the space bar) is pressed.
Like I said, this seems like a fairly common thing to do (stringing together dialogue in a flash movie/game), but I have seen no tutorial nor other help through all my Google and forum searching. A little push in the right direction would be appreciated. Like I said, I've figured out everything else my game needs from preloaders to game inventory to animation effects.
View 1 Replies
Jul 22, 2010
Does flash provide an api to deal with remote stream like IP camera does?
View 2 Replies
Aug 16, 2011
I'm working on creating a new look for my portfolio and had a concept.I would like have one movie clip tween in real time 365 frame increments, while another moves in real time minute or second increments.Along with this, I would like to be able to override the passage of time by scrolling an associated scrollbar.The two tweens would be independent of one another.
View 1 Replies
Jul 30, 2011
I'm writing a Flash game where the game levels are saved in small plain-text files, which I want to embed in the swf file. My current solution has a distinct code smell in its repetition, and I'm certain that there is a better way. My code is basically: In a LevelLoader class, embed all the levels
[Embed( source="levels/1.dat", mimeType="application/octet-stream" )]
protected var level1:Class;
[Embed( source="levels/2.dat", mimeType="application/octet-stream" )][code].......
There are a couple of problems with this approach: I have to add a line for embedding each level. Optimally, all files in a folder would be automatically embedded.A level can't be "prepared" from a string. I'd like to be able to pass LevelLoader a level number or level name as a string.I think that all strings are stored in memory rather than on disk.How could I program this "correctly"?
View 1 Replies