Reputation: 79
Here is the code below: Actually I am using a loop in which i want to assign value to "text" property
var someText=new Kinetic.Text({
x:stage.width()-50,
y:stage.height()/4,
text:9, //i want to change value of this property
fill:'green',
fontSize:14,
fontFamily:'Verdana'
});
someText.text()=19; // here is the error fires
"invalid assignment left-hand side"
error fires in the above statement. pls help? If i execute alert(someText.text())
its works fine and 9
is displayed
Upvotes: 0
Views: 76
Reputation: 8050
The way you try to set your text is not valid. Try:
someText.setText('19');
Upvotes: 0