لود كردن چند تا فايل Swf بصورت راندوم و زماني

Avang2005

مدیر انجمن
سلام دوستان

مي خواستم ببينم كسي مي دونه چطور ي ميشه چند تا فايل Swf رو توسط راندوم لود كرد - من مي خوام بعداز كذشت هر 5 دقيقه اين راندوم اجرا بشه و بجاي Swf اجرا شده يه Swf ديگه جايگزين بشه ( تغريبا مثل پيام روزانه براي سايت )
 

YTERROR

Active Member
تویی یک فولدر این فایلها رو بزار : (i.e. movie_0.swf, movie_1.swf, movie_2.swf, etc)

و نام فولدر رو در کد وارد کن :
PHP:
// create the target clip you'll be loading into...
var holder:MovieClip = this.createEmptyMovieClip("holder", this.getNextHighesteDepth());


// this is the base name for your movies...
var preFix:String = "movie_";

// this is the total number of swf's in your folder... i used 20 for this example
var total:Number = 20;


/*
     NOTE: if you put the images in a separate folder you 
              should specify the path in the preFix variable

          ex.      var preFix:String = "foldername/movie_";
*/



// this loads a swf by taking the base name, appending a random # from 0-'total'
// then appending the .swf extension on the end.. completing the file name

holder.loadMovie(preFix + random(total) + ".swf");



stop();

lموفق پیروز باشید
 

جدیدترین ارسال ها

بالا