Fading jpg array

OK. So I used this code for creating an array with JPGs that automatically cycle and loop. Now I need to know how to, based on using this code, get the JPGs to fade-in/fade-out.


_root.onEnterFrame = function() {
&nbsp &nbsp &nbsp &nbsp Time = getTimer();
&nbsp &nbsp &nbsp &nbsp timeToDisplay = 3;//image display time, in seconds
&nbsp &nbsp &nbsp &nbsp delay = timeToDisplaydisplayed;//calculates the display time
&nbsp &nbsp &nbsp &nbsp iMax = 8;//total number of images to be displayed
&nbsp &nbsp &nbsp &nbsp if (Time>(delay
1000)) {//milli = 1000, 3*1000 = 3 seconds
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp if (iNum>iMax-1) {
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp iNum = 1;
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp } else {
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp iNum++;
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp }
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp displayed++;
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp loadMovie(“image”+iNum+".jpg", “mcClip”);
&nbsp &nbsp &nbsp &nbsp }
};

Anyone have any ideas???

_root.onEnterFrame = function (){
_root.myImage._alpha–;
};

where ‘myImage’ is the name of the clip you want to fade out.
there are so many ways to do what you are talking about, this is just among the most basic.
:slight_smile:
jeremy

Thanks for your reply, Jeremy.

The only question I have is that, based on my code, the movie will not keep entering the frame. So the movie clip will only fade once based on the code you presented.

My code has the image timed to rotate within the array every 3 seconds and then loop. How do I get a fade-in/fade-out given this method?

_root.onEnterFrame = function() {
&nbsp &nbsp &nbsp &nbsp if (!zInit) {
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp trace(“init”);
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp _root.nCount = 0;
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp _root.zFlag = false;
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp _root.nTime = 0;
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp zInit = true;
&nbsp &nbsp &nbsp &nbsp }
&nbsp &nbsp &nbsp &nbsp if (!_root.zFlag) {
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp trace(“loading”);
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp loadMovieNum(_root.aLoadThese[nCount]+".swf", 10);
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp _root.nStart = getTimer();
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp _root.nTime = 0;
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp _root.zFlag = true;
&nbsp &nbsp &nbsp &nbsp }
&nbsp &nbsp &nbsp &nbsp _root.nTime = getTimer()-_root.nStart;
&nbsp &nbsp &nbsp &nbsp if (_root.nTime>2000 and _root.nTime<3000) {
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp _level10._alpha-=4;
&nbsp &nbsp &nbsp &nbsp } else if (nTime>=3000) {
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp _root.unloadMovieNum(10);
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp _root.zFlag = false;
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp trace(_root.aLoadThese.length+"…"+_root.nCount);
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp if (_root.nCount>=_root.aLoadThese.length-1) {
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp _root.nCount = 0;
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp } else {
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp _root.nCount++;
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp }
&nbsp &nbsp &nbsp &nbsp }
};

and it works, i tested it. just create an array named ‘aLoadThese’ on the _root timeline that holds the names of all the files (without the ‘.swf’ at the end).
:slight_smile:
jeremy

How should that array look?

Got it working! You da man!!! Thanks!!!

Now, anyone any ideas on how to add a separate URL for each different image based on this array?