Here is the code I have, I have got it to drag around and such, but i tried to use the drawing API to define the hotspot area but its not working. I think i missed something but i’m not seeing it. Any suggestions would be appreciated.
function makeWords(){
yVar = 20
for (i=0; i<25; i++) {
_root.createEmptyMovieClip("symbolName"+i, getNextHighestDepth());
with (this["symbolName"+i]){
createTextField("drag", 1, 0, 0, 160, 20);
drag.text = symbol*[1];
_x = 325
_y = yVar
drag.border = true;
drag.setTextFormat(textFormat);
// Draw a rectangle in hit_mc
}
this["symbolName"+i].createEmptyMovieClip("hitSpot"+i, getNextHighestDepth());
with (this["symbolName"+i]["hitSpot"+i]){
moveTo(0,0);
beginFill(0xFF0000,10);
lineTo(80, 0);
lineTo(80, 10);
lineTo(0, 10);
lineTo(0, 0);
endFill( );
hitArea = this["symbolName"+i]["hitSpot"+i];
}
yVar = yVar +14
this["symbolName"+i].onPress = function ( ) {
startDrag(this, true);
}
this["symbolName"+i].onRelease = function ( ) {
stopDrag();
this.stopThis(i);
}
}
}