mardi 20 septembre 2016

AS3: Finding coordinates of a string array

I'm learning AS3 and I'm programming a typewriter effect with a blinking cursor. Now I'm "cheating" moving the blinking cursor. Is there a way to locate coordinates of the string when they are shown on the screen?

var myString:String = "Lore Ipsum";
var myArray:Array = myString.split("");

stage.addEventListener(KeyboardEvent.KEY_DOWN, myKeyDown);

function myKeyDown(e:KeyboardEvent):void{
    BlinkingCursor.x = BlinkingCursor.x + 5;

Aucun commentaire:

Enregistrer un commentaire