I WILL PAY FOR HELP!!!


ok,

i've been working on way long , don't understand scripting enough make work. need make following script flip (not crossfade) 17 images in sequence. need same script work in multiple movie clips contained within same master swf. here code:

//-----------------<image crossfade - mov1>-----------------\\
var dyarray1:array = new array(17);
dyarray1[0] = "image0.jpg";
dyarray1[1] = "image1.jpg";
dyarray1[2] = "image2.jpg";
dyarray1[3] = "image3.jpg";
dyarray1[4] = "image4.jpg";
dyarray1[5] = "image5.jpg";
dyarray1[6] = "image6.jpg";
dyarray1[7] = "image7.jpg";
dyarray1[8] = "image8.jpg";
dyarray1[9] = "image9.jpg";
dyarray1[10] = "image10.jpg";
dyarray1[11] = "image11.jpg";
dyarray1[12] = "image12.jpg";
dyarray1[13] = "image13.jpg";
dyarray1[14] = "image14.jpg";
dyarray1[15] = "image15.jpg";
dyarray1[16] = "image16.jpg";


// script load 2 pictures , cycle them fading effect.
// note: looks lot better 30 frames/second.
var showtime:number = 500 // milliseconds picture shows @ 100% alpha.

for(var i:number=0; i<17; i++){
var mc1 = this.createemptymovieclip("mc_img"+i, i);
mc1.loadmovie("images/home/mon1/image"+i+".jpg");
mc1._alpha = 0;
}

var duration:number = 21; // milliseconds per alpha change (framerate).
var count:number = 0;
var alphaphase:number = 1;
var alphacount:number = 0;

var imgindex = 0;
function picswap1():void {
count++;
if(count >= (showtime/duration)) {
alphacount += alphaphase;
// fade current image out
this["mc_img"+imgindex]._alpha = 100-alphacount;
// fade next image in, modular division used array length
// keep indices within bounds of array
this["mc_img"+(imgindex+1)%dyarray1.length]._alpha = alphacount;
if(alphacount >= 100 || alphacount <= 0) {
count = 0;
//alphaphase *= -1;
// instead of reversing alpha phase, step along next image
//and reset alphacount
imgindex = (imgindex+1)%dyarray1.length;
alphacount = 0;
}
}
}

this.mc_img0._alpha = 100;
var intervalid:number = setinterval(picswap1, duration);
//-----------------</image crossfade - mov2>-----------------\\


this works great (in single movie clip) , if want cross fade. try apply other 8 movie clips...with different set of images in different folder , changing name of array etc...the timing on sequences syncs other sequences , ignores duration/showtime. lose crossfade , have independant control on duration/showtime on multiple movie clips contained in 1 master swf.

please please someone...anyone...if know how trying please let me know...when finished...i can pay person reasonable amount sorting out me.

thank in advance,

kyle

what code movie clips?


--

dan mode
--> adobe community expert
*flash helps* http://www.smithmediafusion.com/blog/?cat=11
*the online radio* http://www.tornadostream.com
*must read* http://www.smithmediafusion.com/blog


"kypsul" <webforumsuser@macromedia.com> wrote in message
news:ed9uj8$jb8$1@forums.macromedia.com...
> ok,
>
> i've been working on way long , don't understand scripting
>
> enough make work. need make following script flip (not
> crossfade) 17 images in sequence. need same script work in
> multiple movie clips contained within same master swf. here
>
> code:
>
> //-----------------<image crossfade - mov1>-----------------\\
> var dyarray1:array = new array(17);
> dyarray1[0] = "image0.jpg";
> dyarray1[1] = "image1.jpg";
> dyarray1[2] = "image2.jpg";
> dyarray1[3] = "image3.jpg";
> dyarray1[4] = "image4.jpg";
> dyarray1[5] = "image5.jpg";
> dyarray1[6] = "image6.jpg";
> dyarray1[7] = "image7.jpg";
> dyarray1[8] = "image8.jpg";
> dyarray1[9] = "image9.jpg";
> dyarray1[10] = "image10.jpg";
> dyarray1[11] = "image11.jpg";
> dyarray1[12] = "image12.jpg";
> dyarray1[13] = "image13.jpg";
> dyarray1[14] = "image14.jpg";
> dyarray1[15] = "image15.jpg";
> dyarray1[16] = "image16.jpg";
>
>
> // script load 2 pictures , cycle them fading effect.
> // note: looks lot better 30 frames/second.
> var showtime:number = 500 // milliseconds picture shows @ 100% alpha.
>
> for(var i:number=0; i<17; i++){
> var mc1 = this.createemptymovieclip("mc_img"+i, i);
> mc1.loadmovie("images/home/mon1/image"+i+".jpg");
> mc1._alpha = 0;
> }
>
> var duration:number = 21; // milliseconds per alpha change (framerate).
> var count:number = 0;
> var alphaphase:number = 1;
> var alphacount:number = 0;
>
> var imgindex = 0;
> function picswap1():void {
> count++;
> if(count >= (showtime/duration)) {
> alphacount += alphaphase;
> // fade current image out
> this["mc_img"+imgindex]._alpha = 100-alphacount;
> // fade next image in, modular division used array length
> // keep indices within bounds of array
> this["mc_img"+(imgindex+1)%dyarray1.length]._alpha = alphacount;
> if(alphacount >= 100 || alphacount <= 0) {
> count = 0;
> //alphaphase *= -1;
> // instead of reversing alpha phase, step along next image
> //and reset alphacount
> imgindex = (imgindex+1)%dyarray1.length;
> alphacount = 0;
> }
> }
> }
>
> this.mc_img0._alpha = 100;
> var intervalid:number = setinterval(picswap1, duration);
> //-----------------</image crossfade - mov2>-----------------\\
>
>
> works great (in single movie clip) , if want
> cross
> fade. try apply other 8 movie clips...with
> different set of images in different folder , changing name of
> array etc...the timing on sequences syncs other sequences ,
> ignores duration/showtime. lose crossfade ,
> have
> independant control on duration/showtime on multiple movie clips
> contained in 1 master swf.
>
> please please someone...anyone...if know how trying
>
> please let me know...when finished...i can pay person reasonable
> amount
> sorting out me.
>
> thank in advance,
>
> kyle
>




More discussions in ActionScript 1 and 2


adobe

Comments

Popular posts from this blog

Connecting Raspberry Pi 2 to P10(1R)-V706 LED Dot Matrix - Raspberry Pi Forums

TypeError: <unknown> is not a numpy array - Raspberry Pi Forums

datso and removing imagetitle - Joomla! Forum - community, help and support