Closed alexac1970 closed 12 years ago
Could you post the complete sample please ? Thanks.
Sure, in your demo5 example just replace the setPath statement of the text2 actor with a setLocation, setPosition, setBounds or centerAt:
var text2 = new CAAT.TextActor().
setFont( font ).
setText( "0123456789" ).
setTextAlign("left").
setTextFillStyle(gradient2).
setTextBaseline("top").
setPath(
p,
new CAAT.Interpolator().createExponentialInOutInterpolator(3)).
setPathTraverseDirection( CAAT.TextActor.TRAVERSE_PATH_BACKWARD );
scene.addChild(text2);
I replaced setPath statement with: setLocation(200,200):
var text2 = new CAAT.TextActor().
setFont( font ).
setText( "0123456789" ).
setTextAlign("left").
setTextFillStyle(gradient2).
setTextBaseline("top").
setLocation(200,200);
scene.addChild(text2);
Have changed CAAT.Foundation.SpriteImage drawString function to be exactly equal to CAAT.Module.Font.Font drawText function. That fixes it. The problem is that a SpriteImage is being built out of an Image, and it is being used as a font. Will be fixed in next release. Thanks.
Hi, i've modified demo5 to draw the sprited text on a concrete position with "setLocation" instead of using a path to move the text and i get this error:
"Uncaught TypeError: Object #