Image and text

  • carachi83
  • Born
  • Born
  • carachi83
  • Posts: 1

Post 3+ Months Ago

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;
}
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 7 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.