Simulate "real-time" Updates In Flash Using PHP-sockets Or Some Other Method?
This is from a question I posted earlier in the PHP forum, but with a horrible subject! Also, this is sort-of a PHP question, but it really applies to integrating functionality into Flash projects, so that's why I put it here.
I'm using PHP with a Flash (swf) front-end, but I want to have a some-what "real-time" update of data provided to the front-end. So, I guess my real question is this: do I need to use the limited "sockets"-capabilities of PHP to connect with Flash, or should I just set my Flash to constantly poll my PHP program to simulate "real-time" access? I'm concerned about overloading my webserver with accesses, and honestly I'm not even sure if using sockets is really the way to go since I've never used them before. Any thoughts or ideas?
Thanks! TotalMonkey!
DevShed > Flash Help
Posted on: December 12th, 2001, 01:54 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Page 2 - Simulate "real-time" Updates In Flash Using PHP-sockets Or Some Other Method?
Well that changes things then I would say. Four updates per second and instant updates would probably need the socket server to work well with many users. My application contacted the database about once per 6-8 seconds, and handled 100+ concurrent connections. So 12-18 http requests per second (5-6 queries per request) is about what it handled, but in your case that would only be a 5 or so users. The updates weren't made to be completely real time (instant) either, just needed to get info from the server. I'd still check for bottlenecks at the server end first, because minimal hardware should still be able to do 12+ requests per second, especially on a LAN.
How Do I Do A Real Test To Simulate Slow Connenction?
Hi there, I'm trying to detect the user's connection speed by first loading a swf that i know the size of then taking 2 timer measurements before and after loading and then working out how fast they downloaded the file.
My problem is that when I try to test this locally using the 'Simulate Download' option in Flash I have to run the movie twice (it won't simulate 56k on the first run) and it looks like Flash has cached the movie the second time it runs (loading a 12k file in less than 100 ms wasn't typical of my old 56k connection!). I have 56k selected in the simulate menu. All of this is making it difficult for me to check how my movie loads and responds under a slow connection.
I've attached the fla in case there's something in there that's causing the problem, if anyone has any solutions to get round this they're gratefully received
Thanks for any suggestions in advance.
Schm
Real Time Audio In Flash MX
Hello,
I have a question regarding embedding sound into a Flash movie. Is it possible to import/embed a real time audio feed into a movie? If it's possible please explain how. For example, if I wanted to embed a feed from Bloomberg online radio network inside a movie, how can this be done? I'm using Flash MX.
Thanks. I appreciate your help.
Real-time Graphs In Flash 5 Or Mx
Hello everyone!
I need some help! I try to find tutorials about makin real-time graphs in flash, like the one seen in this page :
http://www.upscale.utoronto.ca/Gener...DampedSHM.html
but I couldn't find any info about this!
Does anyone knows how to do this kind of things or knows where's a tutorial for that!
Thanks in advanced!
Chamaelon
Real Time Flash Thingie
Hellow yall,
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. Anyone know a good way to do this? I didnt find the right tutorial for this.
And thanks a million to whom is willing to help me
RdbmsResolver With Updates Ordered By The Time
Hello,
Is it possible to get updateXML from rdbmsResolver with updates ordered by
the time they occured?
For example, if i insert new record into dataset, delete some other record,
then update and then insert new
one,
i would like to get updateXML, that looks like:
<update_packet ...>
<insert>...</insert>
<delete>...</delete>
<update>...</update>
<insert>...</insert>
</update_packet>
because now i get XML grouped by update operations (first do all inserts,
then updates and finally deletes):
<update_packet ...>
<insert>...</insert>
<insert>...</insert>
<update>...</update>
<delete>...</delete>
</update_packet>
Regards,
Tomas
RdbmsResolver With Updates Ordered By The Time
Hello,
Is it possible to get updateXML from rdbmsResolver with updates ordered by
the time they occured?
For example, if i insert new record into dataset, delete some other record,
then update and then insert new
one,
i would like to get updateXML, that looks like:
<update_packet ...>
<insert>...</insert>
<delete>...</delete>
<update>...</update>
<insert>...</insert>
</update_packet>
because now i get XML grouped by update operations (first do all inserts,
then updates and finally deletes):
<update_packet ...>
<insert>...</insert>
<insert>...</insert>
<update>...</update>
<delete>...</delete>
</update_packet>
Regards,
Tomas
RdbmsResolver With Updates Ordered By The Time
Hello,
Is it possible to get updateXML from rdbmsResolver with updates ordered by
the time they occured?
For example, if i insert new record into dataset, delete some other record,
then update and then insert new
one,
i would like to get updateXML, that looks like:
<update_packet ...>
<insert>...</insert>
<delete>...</delete>
<update>...</update>
<insert>...</insert>
</update_packet>
because now i get XML grouped by update operations (first do all inserts,
then updates and finally deletes):
<update_packet ...>
<insert>...</insert>
<insert>...</insert>
<update>...</update>
<delete>...</delete>
</update_packet>
Regards,
Tomas
Real Time Audio Stream In Flash?
I was asked this recently and it keep bothering me :
Lets begin from the biginning
I got a job for a local radio station, they want a flash site (pretty obvious)
But i was asked i could stream the audio in real time ( or almost) within flash.......
i was just wandering if it's was possible and how ????
24-7 Flash Real Time Text Editor
Anyone here have a similar flash text editor that can do what this one does? http://www.24-7media.de/CMS/
I'm intersted in purchasing it, but the price is pretty high. A cost effective alternative would be great. Any help would be much appreciated.
24-7 Flash Real Time Text Editor
Anyone here have a similar flash text editor that can do what this one does? http://www.24-7media.de/CMS/
I'm intersted in purchasing it, but the price is pretty high. A cost effective alternative would be great. Any help would be much appreciated
Flash Object Movement [according To Real-Time]
Would it be possible to make 2 themes on my flash website [1st Theme: Ork, 2nd Theme: Mahirim] and have them both tween in and out between the 2 themes over a period of 1 hour Real-Time.
Sometime like in the example.
Day = Theme 1, Night = Theme 2.
Example
I plan on using 1 Image and tweening the colors from Green > Blue > Green > Blue again, the 2 moons in the themes will be Green and Blue with the background image tweening from a Green tint under the Green Moon to a Blue tint under the Blue Moon. Its a concept theme for a gaming clan, there are 2 sides to the clan which is represented by 2 of the characters our members will play ingame. Im wanting the site to switch from Character 1 Theme to Character 2 Theme, throughout the day. Maybe do 1 full circle every 30mins, so the entire scenario is played completely in 1 hour.
Is this possible using Flash CS3, and if so how would i go about doing it?
Thanks in advance.
Free Real Time Flash Chat System
Hi, we just opened a free real time chat system using flash.
It uses xmlSocket to connect to our server to provide chat. It can easily handle over 500 concurrent users in the SAME room.
We offer a flexible API that allows you to link the nick to any membership system such as drupal.
It's in open beta so small changes may be made, but the system has been stable under heavy testing for 2 months.
Try it at http://www.gagalive.com
Any suggestions would be appreciated~!
thanks,
have a nice day :)
PHP 5 Sockets With Flash 8, Help With UNIX Sockets
Hi I found the PHP Sockets article very awesome and easy to follow, however, it's only good if you're using a Windows socket connection.
I'm using Fedora, with a fully dedicated server running Apache 2.0.54, PHP 5.0.2.
I know you are supposed to use the Unix Domain socket to connect, and not an IP, but I am having the hardest time finding the built-in socket.
I tried /opt/php51/lib/php5/extensions/sockets.so and I also tried /var/run/acpid.socket, but each one of these gives me this error when I try to compile the php file:
PHP Warning: socket_bind(): Host lookup failed [-10002]: Host name lookup failure in /PHPSocket.php on line 55
That's bascially saying my socket I gave it to connect to is invalid.
Any help would be really appreciated.
Thanks!
Simulate Button Click After Time
Im a bit stuck with this and thought id see if anyone can offer any suggestions.
I have a set of button scripts that are a complex menu, moving text up and down and things. It also moves images around on button click. Everything happens when you click the button, so say you click button text goes down, image moves.
So what I need is to have after say 8 seconds to pretend a buttons been pressed to execute the button script without any clicks (after no clicks or anything, just auto).
Sort of like a demo runnning through the buttons as if someone has clicked them.
Hope someone can help! Thanks for reading.
How Do I Simulate Button Response Time
Hi,
I am creating something simliar to a touch screen. The program has about 5 buttons on screen, when you click on a button, then it will go to another frame. On the next frame, there are more buttons etc..
The problem is, when I click on a button, it changes frames instantly. I want to make it so that, after you click on a button then there is a delay time of say 1 second before it goes to another frame.
Here is what I tried, I created some functions:
-------------------------------------------
function Button_Delay(){
myInterval = 1000;
timer = setInterval(playMe, myInterval)
function playMe()
{
_root.Home_Screen = gotoframe//changes frames in my script
}
}
function End_Button_Delay(){
clearInterval(timer);
}
--------------------------------------------
So I wrote a code such that when you click on a button it calls the function "Button Delay", and gotoframe = the frame name. After it enters the new frame it calls the function "End_Button_Delay" to stop the timer. The problem is, when I go back to the original frame, the button does not work anymore, and that script won't re-run.
Are there any other methods/ideas or patches that anyone knows?
Any help/ideas at all is appreciated! Thanks!
Drawing Real-time During Play Time
It's kind of hard to explain, but what I want to happen is make the movie look like I'm drawing the shapes and lines during playtime. So say if I've got a character, I want it to look like he's being drawn line by line like an old Looney Tunes cartoon or such.
Any help is much appreciated!
Is There A Way 2 Do This In Real Time?
Hi Guru's,
I wanted to create an animation of the sun setting and rising. BUT what I wanted it to do, is actually do it in real time.
So for example, if you see the "animation" at a certain time like 6.30pm it will show the posistion of the sun just setting and moon rising?
can this be done & how?
Real Time
I have been fiddeling with MX (not 2004, just mx) for over an hour, and I cannot figure out how to get it to return any or all of current time. (Ie, seconds, minutes, hours, days, years)
It's probably something pathetically simplistic I should have realised it instantly, but I havent.
Anyone have any hints/suggestions/full out answers?
Real Time
Hi all:
How could I display the current time continously?
Thanks,
Frenk888
Using Drawing API To Draw On Screen And Then Having Flash Redraw In "real Time"
Hi,
I am about to attempt to create a Flash movie that would eventually become a screensaver in Screentime. What this is going to consist of is a customized control panel (as per the Screentime API specs) in which the user can draw on screen with the built in drawing methods and the actual screensaver in which the user's drawing is recreated, line by line, in simulated "real time" in a scaled up full screen version.
What I'm asking here is basically what the best approach would be for me to accomplish this. I don't necessarily need a step by step tutorial, as I have a pretty good grasp of Actionscript at this point. The drawing interface part is simple, what I really am trying to figure out is the best approach to capturing each vector point in sequence and assigning it a time stamp as well, so that it can be "played back" in at least an approximation of how the user drew it.
So far what I am thinking is that I should store each point in the drawing as a new object in an array, with all the various properties of the vertor point including it's time stamp as properties of that object. What I can't really figure out so far is what is the best way to script the intervals in which my recording script captures this vectors and pushes them into the array.
Any advice at all would be much appreciated.
Thanks,
Brian
Real-Time MC Rotation
Hello,
I'm trying to rotate a mc with degrees calculated from this._xmouse. I got the math down but am having trouble with the loop.
In a button on the mc i want to loop inside a on(press) call and make a _rotation change until (release).
Where or how can I do this loop?
Any help is appreciated!!
Real Time Contents
flash veterans out there...
I call for help again!
what can i use as a real time database?
to use in flash
e.g. chatroom?
Moving MC In Real Time
I know this is relatively simple, and I've seen a tutorial that goes through this, but now I can't find it.
I have a button - when clicked, a MC should move from one side of the movie to the other. Simple, right? Well, it kinda works. The MC goes from side to side, but I need to see the MC move - not just appear at the stopping point each time. Here's my AS:
Code:
on (release) {
if (dot._x<125) {
for (var i = dot._x; i <= 500; i++) {
dot._x = dot._x + 1;
}
} else {
for (var i = dot._x; i >= 70; i--) {
dot._x = dot._x - 1;
}
}
Any help?
Cheers,
Quasi
Real Time Scripting
is there a way to save information with flash to a server (server-side scripting) so quickly that it could be almost real time.
im thinking of making a game where two people (on different computers) would play together and when one player moves his icon would move on both computers. this would take real-time saving of information and loading of information.
this is really important to me
if anyone can help even just a little please post something
thanks a lot,
Steve
Real Time Bookings
Hi,
What is the easiest way to set up a real time calender?
I need to set up a booking system for people to use online and be able to click a date and book the date, there and then and then send a confirmation.
It needs to be an instant update of the calender when the date is selected.
How can I do this please?
FPS Real Time Detection
How can I find out the actual FPS of my movie because although it is set to 30 it is probably not running at 30.
Real Time Update
Hi guys, how do i start or do a movie where there is an image that's dragable, and when i drag the item, some other person who is viewing the same movie will actually watch that item being drag. Hope you get what i mean.
Real Time Capture
Hi everyone, I'm new here. i'm familiar with Flash basics but not the scripting.
I have a dialogue on which I want to sync a very basic mouth open/closed animation (2 frames : open & closed) but as it's rather long I'm trying to find a way to trigger it and record the result.
For instance through a midi keyboard with one note assigned to closed mouth and one note assigned to open mouth. (or a keyboard shortcut in fact)
So my questions are :
can I record in real time that type of information in flash, so that it would add the right key frames at the right place ?
if not, is there another way to do this ?
thanks in advance,
Chris
(I posted that already in animation but that might be too specific)
Real-time Mp3 Volume
Is it possible to get a value for the volume of an mp3 in real time? Like, a number 0-100, and it would change as the mp3 did, like if the song got real quite, the number would go down, and if it got real loud, it would go up. Is this possible?
Real-time Update
Im not sure if this already does real time update or not so if it doesn't sorry.
Ok so heres an example. Flash polls which use php to connect to a database/xml file whatever.
When someone votes a variable is incremented by 1 which would obviously show how many votes in total there are.
How would i do this so on someones flash it auto-updates everytime someone votes. So if someone had it open where they could see the total number of votes and then someone else on a different computer votes, it would automatically update the total number of votes on the other persons.
This would also be like a memberlist for a forum which is automatically updated apart from it would use different php code... i would imagine.
Thanks in advance.
Real Time Reflection
Hey. I've been trying to work a workaround out for generating real time reflections of an external movie loaded into flash using Flash MX. What I had started was a duplicated movie clip that loads inside another and is then flipped vertically, but that of course doesn't allow for the "reflection" to change with the movie it's a copy of. Any basic ideas for how to do this without using the newest version of flash?
Dewman
Real Time Data
Dear Sir
I would like to ask how to show real time data like the live forex quote at http://www.fxuniversal.com/
It was done by Flash. May I ask how the real time data streaming and get by flash player?
I searched over the net and found that there are 3 methods to do it, but I am not sure.
1) Actionscript + PHP + MySQL
2) Flash CS 3 + ASQL
3) Flex 3 + MySQL
May I ask which method is mostly suitable for showing live numerical data with highest security level?
Regards
Real Time Drawing?
hi,
i dont know if this is a general question, but ive been seeing a lot of sites that have "real time drawing", were it seems as if flash is daring everything out. i have tried to use motion and shape to get the same affect but it dosent work.
a good example is http://www.kx2web.com/
i really want to get this, anything would help.
thanks
Real Time Data
Dear Sir
I would like to ask how to show real time data like the live forex quote at http://www.fxuniversal.com/
It was done by Flash. May I ask how the real time data streaming and get by flash player?
I searched over the net and found that there are 3 methods to do it, but I am not sure.
1) Actionscript + PHP + MySQL
2) Flash CS 3 + ASQL
3) Flex 3 + MySQL
May I ask which method is mostly suitable for showing live numerical data with highest security level?
Regards
Real Time Simulator
I need help in creating a real time simulator (Simulating for outdoor campains)
I work for an outdoor company and we are hoping to create a simulator, where our clients can upload their images onto our website and be able to simulate and view how their campain would look like on a pre designated space of a photo (the photo will have a designated space where the uploaded image from the client will fit in).
Can anyone help?
best regards
ps. please see images attachment.
Real Time Clock...and ?
I made this clock in a real time:
60 seconds = 1 minute
60 minutes = 1 hour
But I have some problems that I want to ask you. I can't make the seconds-hand, because if I do it, it havent not enough frames to do(?).
Other question: I know we can do this clock rotate with ActionScript but I don't know how. Could you give me some suggestions? I tried to make this rotation with the getSeconds(), getMinutes(), getHours() methods and the _rotation property but it didn't work well. I don't know how to say that.
I post the .fla too.
Thx a lot
ExternalInterface In Real Time
Is it possible to have a flash movie loaded into an iframe, and have JavaScript call a function inside of flash without reloading the entire iframe. So in real time as the flash movie is playing JavaScript can talk to it and send it variables and trigger functions?
Thanks,
Having A Real Difficult Time Here.
First let me say that this is the first time I've had to use the forums of this great site, I have always found everything I needed here. I'm having some trouble now though. I want to create a swf that when loaded automatically takes you to a random web page. I wanted to use the same technique that homestarrunner.com has at their welcome screen. Basically I have about 5 different pages and I want that initial swf to load one of those 5 at random. Can anyone give me hand with this? Thanks for reading, and thank you in advance to any helpers.
Show Real Time
Hi guys,
I am trying to get the server time in real time and I can't get it to count the seconds in realtime,
I am able to get the time from CFM to Flash, but if I loop the frame in order to get the real time like the seconds, my page takes forever to load. Can someone please tell me what I am doing wrong?
What is the best way to get the servertime and make Flash to show the counting seconds in realtime. Like This one but geting the time from CFM.
Here are my codes:
In CFM:
<cfset todayDate = Now()>
<cfoutput>&servertime=#TimeFormat(todayDate, "h:mm:ss tt")#</cfoutput>
In Flash frame one (1):
loadVariablesNum("showTime.cfm", 0);
this.onEnterFrame = function() {
servertime = eval("servertime");
MyTime = unescape("Server Time is: "+servertime);
};
In Frame tree(3):
gotoAndPlay(1);
Thanks in advance.
Edited: 03/05/2007 at 01:44:50 AM by Jafang
Real Time Help Functionality
As you all can see by my user id i have been a part of this site for a long time. The biggest issue that I have had is waiting for responses. If Adobe would provide us with instant chat in a community environment it would really speed up troubleshooting but they have not.
So, here is an awesome site that I and others are using to talk, help, and get answers to questions immediately from other Flash Developers.
http://forums.flashgods.org/
yes you will need to register to get a username and account but man it is so worth it in order to get real time help and not have to sit there refreshing the page hoping someone will respond to your question.
Change FPS In Real Time?
Ok, just a quick question this time...
Is it possible to change the frame rate of a flash movie while it is playing, with action scripting or something?
Cheers
Real Time Graphics
I have a pretty complicated problem. I need to retrieve realtime data from a server via a perl script. The problem is that i call the same script. Will it return different data every 5 seconds for example? Or it will use cached data? And if so, how can i solve this problem?
Also, what method will you apply if you would need real time data in flash?
Thank you very much for the answers.
Real Time Bet Application
Hello there everyone,
I am a newbie and I need to develop a real-time application using Flash 8 to build the interface. I know that the underlying code produces JSON objects, which provide the data i have to display, but i also have the option of using the database directly and create my own XML files.My main consideration is how will my application know when data changes?Which Flash object i have to use in order to achieve this?? I read somewhere that using XML Socket is the proper solution for real-time things.
Any suggestions will b creatly appreciated!
Thanks in advance,
Kostas Lagos
Change FPS In Real Time?
Ok, just a quick question this time...
Is it possible to change the frame rate of a flash movie while it is playing, with action scripting or something?
Cheers
Real Time Communications
How does real time communication work in Flash.
As an example, a stock ticker, or sports scores. How does this information get passed to flash in real time.
I know there will need to be a two way communication, such as a client constantly polling for info, or maybe a push from the server.
How is stuff like that done?
AS3 - SWF To PDF (vector) In Real Time
I have an flash application which is simple text editor. I want to save the output of that application as pdf in vector format. Is it possible? Please help me if there is any solution.
Thanks
Real Date/time
Hi Guys!
I'm joćo form portugal and i'd like to ask you how can i put the real date/time in my FLA/SWF...
How can i do it!
Tks :
|