this is better but still has a fault.... you will see what i mean what you run it....i have to go to a meeting so post back if you get it..if you dont ill try to sort this last problem when i get back.
MovieClip.prototype.drawStar = function(x, y, points, innerRadius, outerRadius, angle) {
// ==============
// mc.drawStar() - by Ric Ewing (ric@formequalsfunction.com) - version 1.4 - 4.7.2002
//
// x, y = center of star
// points = number of points (Math.abs(points) must be > 2)
// innerRadius = radius of the indent of the points
// outerRadius = radius of the tips of the points
// angle = [optional] starting angle in degrees. (defaults to 0)
// ==============
if (arguments.length<5) {
return;
}
var count = Math.abs(points);
if (count>2) {
// init vars
var step, halfStep, start, n, dx, dy;
// calculate distance between points
step = (Math.PI*2)/points;
halfStep = step/2;
// calculate starting angle in radians
start = (angle/180)*Math.PI;
this.moveTo(x+(Math.cos(start)*outerRadius), y-(Math.sin(start)*outerRadius));
// draw lines
for (n=1; n<=count; n++) {
dx = x+Math.cos(start+(step*n)-halfStep)*innerRadius;
dy = y-Math.sin(start+(step*n)-halfStep)*innerRadius;
this.lineTo(dx, dy);
dx = x+Math.cos(start+(step*n))*outerRadius;
dy = y-Math.sin(start+(step*n))*outerRadius;
this.lineTo(dx, dy);
}
}
};
aPosX = [100, 200, 300, 400];
aPosY = [75, 75, 75, 75];
aLinks = ["google.com", "excite.com", "yahoo.com", "macromedia.com"];
aText = ["Harbor Oaks", "Council Bluffs Properties", "Crystal Lake", "Margerate Lake"];
function star() {
for (var st = 0; st<aPosX.length; st++) {
d_mc = _root.createEmptyMovieClip("draw_layer"+st, st);
d_mc.clear();
d_mc.lineStyle(2, 0x6688AA);
d_mc.beginFill(0xFF0000, 100);
d_mc.drawStar(aPosX[st], aPosY[st], 5, 5, 15, 15);
d_mc.endFill();
links(d_mc, st);
}
}
function links(clip, id) {
clip.onPress = function() {
getURL("
[id]);
};
}
star();
var NUM_OF_TEXTBOXES = 5;
j= 20;
var xPos, yPos, myStyle;
var name = ["textBox1", "textBox2", "textBox3", "textBox4", "textBox5"];
for (var i = 0; i<aPosX.length; i++) {
xPos = aPosX
- 40;
yPos = aposY + 10;
this.createTextField(name, j, xPos, yPos, 100, 100);
this[name].border = true;
this[name].text = aText;
trace(this[name].text);
this[name].multiline = true;
this[name].wordwrap = true;
myStyle = new TextFormat();
with (myStyle) {
font = "Arial";
size = 14;
color = 0x0000FF;
bold = true;
}
this[name].setTextFormat(myStyle);
j++
}