wangbar,
Your above sample is pretty kool. I was trying to dicept your code, can you please help me out?
onClipEvent (load) {
// set up values for path of clips
yPos = new Array();
zPos = new Array();
OK, yPos and zPos are arrays (one dimensional) with 720 elements (depth)
// fill arrays with values
for (j=0; j<720; j++) {
yPos[j] = (Math.sin(j*Math.PI/180)*50)+180;
zPos[j] = (Math.cos(j*Math.PI/180)*50)+180;
}
Neat for/next loop! Math.sin, Math.PI and Math.cos gives the target away as a circle ... we are dealing we radius, area of a circle ???
Can you explain the fixed numbers (/180, *50 and +180)?
// duplicate clips for the path
for (i=1; i<=72; i++) {
duplicateMovieClip (_root.target1, "trail1"+i, i+72);
duplicateMovieClip (_root.target1, "trail2"+i, i);
}
Here is where the sphere chain is created, but what's "trail1" and "trail2"? I guess these are upper and lower paths ... where are they and how are they defined or declared?
// initialise counter
count = 0;
}
onClipEvent (enterFrame) {
// place clips on helix path
for (i=1; i<=72; i++) {
_root["trail1"+i]._x = (i*10)-count;
_root["trail1"+i]._y = yPos[(i*10)];
_root["trail2"+i]._x = (i*10)-count;
_root["trail2"+i]._y = zPos[(i*10)];
}
What's going on here? What is the result of concatenating _root["trailX"+i]? Is trailX a litteral or number?
// go to the next step on the path, loop if finished
count += 10;
I don't think I've seen this in quite some time but I am guessing "add 10 to count" ... ? If incrementing count by 10, is that the size of the sphere in pixel? If not, why 10?
if (count>=360) {
count = 0;
}
}
What is a "control clip"? Are these blank MCs (nothing on their timeline)?
Are control clips the norm when altering or programming to monitor _x _y and/or properties?
Sorry to trouble you with this, hope you do not mind. One could always cut and paste code, but I rather write the code understanding what it does and why?
Thank you in advance for your time and assistand!
Regards;
josel
If you have the knowledge, consult and educate those who need it! - Jose Lerebours