I found some code on the macromedia website that creates a star by drawing it. What I want to do is make 5 of them and have each on a different link. here is the code
d_mc = _root.createEmptyMovieClip("draw_layer", 2);
function star() {
d_mc.clear();
d_mc.lineStyle(2, 0x6688AA);
d_mc.beginFill(0xFF0000, 100);
d_mc.drawStar(100, 75, 5, 25, 50, 90);
d_mc.endFill();
}
star();
draw_layer.onRelease=function(){
getURL(" + i,"_blank","POST"
;
}
draw_layer._x = 100
draw_layer._y = 100
I have tried it like this, but now no stars appear . What might I be doing wrong.
for(i=1;i<5;i++){
d_mc = _root.createEmptyMovieClip("draw_layer"+i, 2);
function star() {
d_mc.clear();
d_mc.lineStyle(2, 0x6688AA);
d_mc.beginFill(0xFF0000, 100);
d_mc.drawStar(100, 75, 5, 25, 50, 90);
d_mc.endFill();
}
star();
[draw_layer].onRelease=function(){
getURL(" + i,"_blank","POST"
;
}
draw_layer._x = 100 * i
draw_layer._y = 100 * i
}
d_mc = _root.createEmptyMovieClip("draw_layer", 2);
function star() {
d_mc.clear();
d_mc.lineStyle(2, 0x6688AA);
d_mc.beginFill(0xFF0000, 100);
d_mc.drawStar(100, 75, 5, 25, 50, 90);
d_mc.endFill();
}
star();
draw_layer.onRelease=function(){
getURL(" + i,"_blank","POST"
}
draw_layer._x = 100
draw_layer._y = 100
I have tried it like this, but now no stars appear . What might I be doing wrong.
for(i=1;i<5;i++){
d_mc = _root.createEmptyMovieClip("draw_layer"+i, 2);
function star() {
d_mc.clear();
d_mc.lineStyle(2, 0x6688AA);
d_mc.beginFill(0xFF0000, 100);
d_mc.drawStar(100, 75, 5, 25, 50, 90);
d_mc.endFill();
}
star();
[draw_layer].onRelease=function(){
getURL(" + i,"_blank","POST"
}
draw_layer._x = 100 * i
draw_layer._y = 100 * i
}