Hier noch eine Testfunktionalität.
Einfach einen Array mit den Lückenwörtern übergeben.
PHP-Code:
function test(_array){
// Koordinaten ermitteln
for (var i = 0 ; i < _array.length; i++){
var coords = my_txt.getTextCoordinates(_array[i],2);
//
// gesuchten Text markieren
this.createEmptyMovieClip("mark"+i+"_mc",i+3);
with (this["mark"+i+"_mc"]){
_x = coords['left'];
_y = coords['top'];
width = coords['right'] - coords['left'];
height = coords['bottom'] - coords['top'];
lineStyle(0);
lineTo(width, 0);
lineTo(width, height);
lineTo(0, height);
lineTo(0,0);
}
}
}
test(['Lücke','Generalsekretär','Merkel', 'Berlin', 'Ministerpräsident','Bayern', 'Arbeit']);