Search the web
Sign In
New User? Sign Up
JavaScript_Official · JavaScript . AJAX . ActionScript
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
BEGINNER QUESTION: Date/Time Function   Message List  
Reply | Forward Message #16528 of 16817 |
Array Help

I am only getting the first image to play over and over, what am I
missing here?


var imageSequence = new Array();
imageSequence[0] = "images/imageLoad1";
imageSequence[1] = "images/imageLoad2";
imageSequence[2] = "images/imageLoad3";
imageSequence[3] = "images/imageLoad4";
imageSequence[4] = "images/imageLoad5";
imageSequence[5] = "images/imageLoad6";
imageSequence[6] = "images/imageLoad7";
imageSequence[7] = "images/imageLoad8";
imageSequence[8] = "images/imageLoad9";
imageSequence[9] = "images/imageLoad10";
imageSequence[10] = "images/imageLoad11";
imageSequence[11] = "images/imageLoad12";

for (var i = 0; i<12; i++) {
this._alpha = 0;
this.createEmptyMovieClip("img", 0);
this.img.loadMovie((imageSequence[i]) + ".jpg");
};

function fadein():Void
{
if(this._alpha < 100)
{
this._alpha++;
}
else
{
clearInterval(this.IntFadein);
}
}

this.IntFadein = setInterval(this, "fadein", 1);



Thanks,
Ed




Wed Jan 7, 2009 8:20 pm

ed.blinn...
Offline Offline
Send Email Send Email

Forward
Message #16528 of 16817 |
Expand Messages Author Sort by Date

I'm just a beginner, so bear with me. I am experimenting and trying to figure out what conditions I need (for the "if" statement) to make it display "Happy New...
spylogic3
Offline Send Email
Jan 7, 2009
12:03 am

What you need is 3 Date objects: <script type="text/javascript"> <!-- var curDt = new Date (); // Year is set to 2000 no matter what (hack) so this will work...
Tim Sabin
timsabin
Offline Send Email
Jan 7, 2009
4:09 am

Thanks for your ideas ... I had to set the month and day to Jan 1, too ... the...
spylogic3
Offline Send Email
Jan 8, 2009
12:59 am

I am only getting the first image to play over and over, what am I missing here? var imageSequence = new Array(); imageSequence[0] = "images/imageLoad1"; ...
ed.blinn@...
ed.blinn...
Offline Send Email
Jan 8, 2009
12:59 am

Your programming language is not JavaScript but ActionScript. I am not familiar with Flash. I guess the problem is the following code: for (var i = 0; i<12;...
comphilip@...
comphilip
Offline Send Email
Jan 8, 2009
10:04 pm

Hi Ed, Actually this is ActionScript not Javascript but I'll take a swing. There are a couple of things going on here. In the "for" loop, it looks like you...
Paul Donahue
scramjetter
Offline Send Email
Jan 8, 2009
10:05 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help