Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

watch() & setInterval()

Status
Not open for further replies.

cynthian

Programmer
Mar 9, 2004
1
US
Hi all,
I have this running code below. I'd like to have a function to add into this code that after setInterval is clear, I will display a text below the image.
As I know we can use watch() or listener() in this case, but I don't know how to do it.
If you have any idea, please let me know.
thanks

Cynthia
this is my code
********************

_root.img = 0;
j=0;
picName = "cartoons0178_flash.jpg";

function loadjpg (picName) {
if (j<6){
this.createEmptyMovieClip("holder"+j, 1);
this["holder"+j]._x=0;
this["holder"+j]._y=j*45;
this["holder"+j].loadMovie(picName);
}
j++;
}

function addImg()
{
if (_root.img < 6){
loadjpg(picName);
_root.img++;
}
else{
clearInterval(idImg);
}
}
idImg = setInterval(addImg, 1000);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top