Thanks for your reply. Do you have any links for the first query ie Changing Movie Clip Properties over time? I also have a question on Flash Form and ASP.
Please help
wouldn’t you want it to be happening constantly? (ie it fades the whole 10% over that one minute period) or did I missunderstand?
onClipEvent(load) {
stoptime = 600; //seconds to stop effect
//stopmiltime = 600000; //miliseconds till stop - commented out due to use of seconds instead
time = 60; //seconds to happen over
//miltime = 60000; //miliseconds for effect - commented out because I decided to use seconds
framerate = 12; //framerate
n = 0; //just a counter to stop effect
frames = time*framerate; //convert seconds to frames
//frames = (miltime/1000)*framerate; //uses miliseconds instead of seconds (if thats what you need)
stopframes = stoptime*framerate; //number of frames to stop in
//stopframes = (stopmiltime/1000)*framerate; //miliseconds instead of seconds if thats what you need
}
onClipEvent(enterFrame) {
if(n < stopframes) {
this._alpha -= 10/frames; //take away the alpha
this._rotation += 45/frames; //add the rotation
n++;
}
}
That code will make the effect happen slowly over the whole minute. I got the impression thats what you needed. I also commenyted out the options to use miliseconds instead of seconds. Hope this all makes sense. It was kinda messy and quick (note: this goes on the Actions for the Circle clip)
Thanks for the reply. I’ve solved the following:
a)rotate 45 degrees and fade by 10% every 1 minute. My movie rate is 12 fps.
b) stop fading and rotating after 10 minutes
With your help, of course. Thanks!
Now, the thing that I don’t understand is how to change the animation based on button clicks.
Is there anyway to set the getTimer value to zero?
If it’s not much trouble, could you please check the codes in the attachment
(frog1.fla) and highlight what I’m doing wrong? Thanks, again.
well no… but I’m assuming you want to restart the effect and can’t just use the same code, so what you should is change VinC3’s code slightly (sorry VinC3, maybe you shoulda done this bit):
dup = function(stime) { //stime is the value of getTimer when the function started
trace("time = "+timer);
if (600000>getTimer()-stime) { //this checks if the current "time" is ten minutes (in miliseconds) past the start time
circle._rotation += 45;
trace("rotation = "+circle._rotation);
circle._alpha -= circle._alpha/10;
trace("alpha = "+circle._alpha);
} else {
delete dup;
clearInterval (timer)
}
};
stimer = getTimer(); //this is a value that won't change while the function goes and therefore is the start time
timer = setInterval(dup, 60000, stimer); //we sent the 'stimer' variable as a parameter of the function