1 Replies - 1127 Views - Last Post: 28 February 2008 - 03:46 PM

#1 anulasingh  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 28-February 08

Multiple external images in flash with time intervel

Post icon  Posted 28 February 2008 - 12:03 PM

hi i am just new in action script
but i want to put some pics on my site
and using this code
it nither giving any error nor loding any image .
"both flash file and image file in same folder then only ?
plz help me !
-------------------------------------code here-----------------------

myImages=["image0.jpg","image1.jpg","image2.jpg"]

//-----------for loop...

// ------- set inerval----------
var interval =setInterval(myLoader,3000);

imageCount=0;
function myLoader(){
mcHolder.loadMovie(myImages,2);
imageCount++;
if(imageCount>myImages.length){
clearInterval(loadInterval)
}
}
loadInterval=setInterval(myLoader,3000);

thanks in advance

i hope i get that form you nice pplz

Is This A Good Question/Topic? 0
  • +

Replies To: Multiple external images in flash with time intervel

#2 thehat  Icon User is offline

  • awake ? web();
  • member icon

Reputation: 106
  • View blog
  • Posts: 951
  • Joined: 28-February 08

Re: Multiple external images in flash with time intervel

Posted 28 February 2008 - 03:46 PM

Hey,

What you have there will keep trying to load images in on top of each other, and isn't ever referencing an element from your array. This creates a seperate holder for each image, and positions eash holder to the right of the last.

myImages = ["image0.jpg","image1.jpg","image2.jpg"];
imageCount=0;
//-----------for loop...

// ------- set inerval----------
var interval = setInterval(myLoader,3000);



function myLoader() {
	var tempMovie = mcHolder.createEmptyMovieClip("imageHolder"+imageCount,imageCount);
	tempMovie.loadMovie(myImages[imageCount]);
	tempMovie._x = mcHolder._width;
	imageCount++;
	if(imageCount > myImages.length){
		clearInterval(interval);
	}
}



Hope that helps!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1