Solved

Flash application - Live updating ?

Posted on 2006-11-05
2
197 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

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

This is about my first experience with programming Arduino.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Starting up a Project

688 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