Solved

Flash application - Live updating ?

Posted on 2006-11-05
2
194 Views
Last Modified: 2010-04-16
Hi,
    I have been asked to create a flash application to emvbed into a website that auto-updates matches and scores, what scripting language could i use for this?
0
Comment
Question by:ashburn69
2 Comments
 
LVL 13

Accepted Solution

by:
AngryBinary earned 250 total points
ID: 17882006
This solution depends primarily upon what the source of the match/score data is, and secondarily what platform it is being served from. PHP is a very widely used tool for this particular purpose. The script would have to retrieve the data from a database or consume an RSS feed and print the data to the output stream (more simply put, "print()" or "echo()") in either XML or some other parseable format, like a comma delimited list of values, or a query string style expression. You would then use Flash's XML classes to read in the file output in something like the following manner:

var scores = new XML();
scores.load("myPHPscript.php");
scores.onLoad = function()
{
    trace(this.toString());
    //do something with the scores here
}

If the scores will be written by hand, uploaded via FTP, or stored in some manner of text file, the above method will also work.

If the scores are being pushed out via a webservice, Flash also has built in capability to handle that. You will need to include the webservice components in your movie, which can be parameterized to call a specific webservice method, or you can fire it up at runtime:

var ws = new WebService("http://www.scoresite.com/wsdlAddress.asmx?wsdl");
var callBack = ws.GetScores(); //"GetScores" must be a method defined by the webservice
callBack.onResult = function(result)
{
   //do something with scores here
}

Randall
0
 
LVL 1

Author Comment

by:ashburn69
ID: 17883479
Ok, thanks ill find out the source of the scores and get back to you!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Java Loop 6 59
Basic Java Case or If-Else statement... 3 50
MacOS and programming in React 7 34
Full Screen problem when auto scale IFRAME 2 79
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
A short article about a problem I had getting the GPS LocationListener working.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now