View Full Version : [AS2] Updating Flash Projector
I have a flash projector program that I am distributing to my employees to use. Data in this projector will update often and I would like the projector to display a message to the user when an update is needed/ready.
Is there a way for the projector to communicate with a website/server behind the scenes every time its opened to check if there is an update available and if so display a message to the user that an update is required?
10-21-2010, 02:45 PM
Well you could always just update the data each time the program is loaded. Something like this, which is used to load the xml data:
of course if an update occurs while the program is open, it would not be aware of that update unless you had a refresh occuring every 30 minutes or whatever.
I'm not worried about an update while the program is running as long as it checked when it opened. This should work then.
Does using your method open a browser window when this happens though, because this is a projector and I dont want it to open a browser every time the program is run?
Thanks for your help.
10-22-2010, 12:09 AM
The code posted is just an example of one Flash application that gets it's data from an xml file. To make sure that the application always gets the newest version of the xml file, and not one that is coming from the Internet cache (which could be old data) the date and time is always appended to the file name.
So I can update that file whenever... and anyone loading the Flash (which gets it's data from the xml file) will alway get the newset version.
It's just an example that you may be able to adapt to your application. So if you happen to draw in data from an external source, like xml, you could use the appended date/time method to check for updates.
In effect, you would be giving the data file a new file name every time the application is loaded. You could physically do that, create new data, give it a new file name, change the code in the application to match the new file name... but you see the effort that would take.
That little piece of code is one example of how to accomplish that without doing it by hand.
Review flash "news-ticker" tutorials for more info.
And no, it doesn't open anything, you are just using it to change the file name each and every time your data file is called into Flash
vBulletin® v3.8.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.