Hi,
I would like to create a flash script that provide to have some text (that I take by php) mixed with a image. Every five minutes the text stops and let the image appear for 15 seconds, and the restart the text passages; every five minutes should be repeted the same things. I maneged to create the text in flash and see it for five second with a timer (I wrote the script on the bottom of the page) but i can't manage to make the image appear....How can I do it? It's better to use other two timer or a cyclic one, for example for (;???
Thank you
var delay:int;
delay =5000;
var url:String=new String();
url="http://192.168.1.8/index.php?random=" ;
var stringa:String = new String();
stringa="Testo";
var timer:Timer= new Timer(delay,0);
box_text.text=stringa;
timer.start();
timer.addEventListener(TimerEvent.TIMER, showText);
function showText(evt:TimerEvent):void {
var Request:URLRequest = new URLRequest(url + Math.random( ));
Request.method = URLRequestMethod.GET;
var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
loader.addEventListener(Event.COMPLETE, completeHandler);
loader.load(Request);
}
function completeHandler(evt:Event) {
stringa = evt.target.data.stringa;
box_text.htmlText = stringa;
return;
}