The effect i want though is for the reduction in alpha to stagger from instance to instance, whereas at the moment they all fade together.
Is there a way of tweeking the code i already have to achieve this staggering effect or does the whole thing need re thinking.
for (var i=0;i < 10;i++)
{
for (var j=0;j < 10;j++)
{
cube.duplicateMovieClip(“cube”+num, num);
mc=this[“cube”+num];
mc._x=gridxi;
mc._y=gridyj;
num++;
cube.angle = i*.1+j*.1; // from one corner to the other.
cube.onEnterFrame = alphaEffect;
}
}
function alphaEffect() {
this._alpha = Math.sin(this.angle += .1)*50+50;
}
Ok, i havent checked to see if that will acutally work, but it looks about right to me. Just put that in a frame on the root timeline and have a MC in your library with an ID ‘cube’. I know you knew that last bit anyway .
Let me know if it works,
Regards,
Viru.
P.S look at the information section in Site 1 to see something similar.
Check out my actionscript below. Put that in a frame on the main timeline. And in your library create a cube shape with dimensions 20x20. Then in the Linkage settings give it the ID of cube.
[AS]
gridy = 30;
gridx = 30;
num = 0;
for (i=0; i<8; i++) {
for(j=0; j<8; j++) {
c = attachMovie(“cube”, “cube”+num, num);
c._x = 50+(i25);
c._y = 25+(j25);
Thanks to Viru this script works a treat. The next step is to get it to just loop once and then stop, alas thats were my AS comes unstuck. If you can come up with a solution Viru that would be great in that it would feel like its come full circle.
but it is open to the floor.
gridy = 30;
gridx = 30;
num = 0;
for (i=0; i<8; i++) {
for(j=0; j<8; j++) {
c = attachMovie(“cube”, “cube”+num, num);
c._x = 50+(i25);
c._y = 25+(j25);
First of all, please use the actionscript tags, it makes code easier to read
So, if I understand correctly what you’re trying to do, 1 full circle is 360°, that is to say 2*PI radians, so if you try this: