Easy Guardian provides alarms by texting system administrators
If you would like to monitor you server 24h/24h this is the right tool for you! It brings together NMAP and Net-SNMP in a small silent Linux embedded box.  Visit: http://www.easyguardian.com
FoxBox arrow How-to arrow SMS on Adobe Flash
English
Integration with Adobe Flash PDF Print E-mail
A lot of website are using FLASH technology because it offers the opportunity to create really nice interfaces with animations and user interaction.
In this page we will create a simple FLASH interface that shows you the last SMS received.

As all other processes also this one is controlled by the main event handler. The code below is the call to the module from event handler and it is a portion of it:

.....
#Save messages in XML format
#if [ "$1" = "RECEIVED" ]; then
#/etc/sms/scripts/sms2xml $1 $2 $3
#fi
#
....

To activate/deactivate the module you always have to remember to remove/add the # sharp character as
described in the Event Handler how to.

After the activation of the sms2xml script, each time you receive an SMS it will be stored to http:///xml/sms.xml
The format of the file sms.xml is as follow:

393494703237
text of the message


To load the XML file inside flash we need to write a little procedure with actionscript (Courtesy of Roberto Corti):

// Author: Roberto Corti
// Create new XML Object and set ignoreWhite true to ignore white spaces
messaggio = new XML();
messaggio.ignoreWhite = true;

// Load the XML file where your informations are stored
messaggio.load('sms.xml');

messaggio.onLoad = function (success) {
if (success) {
// If your XML Document is loaded succesfully you can procede with the for function
for (var n = 0; n
trace(n + ' ' + messaggio.firstChild.childNodes[n].firstChild.nodeValue);
}
// You can display the nodeValue into the stage using variables
from = messaggio.firstChild.childNodes[0].firstChild.nodeValue;
msg = messaggio.firstChild.childNodes[1].firstChild.nodeValue;
}
};

Click here to download the full example.
 
< Prev   Next >

buy foxbox
buy on FoxBox eShop



For further info contact us by mail This e-mail address is being protected from spam bots, you need JavaScript enabled to view it providing us the FoxBox model you need and your company details.

KDEV di Davide Cantaluppi, P.IVA 02984320131

http://www.kdev.it