Some progress on HTML5 text

This commit is contained in:
Skyler Lehmkuhl 2012-01-18 22:38:37 -05:00
parent 7d6d5a46a0
commit affb2f3ad5
2 changed files with 20 additions and 0 deletions

17
base.js
View File

@ -445,6 +445,23 @@ function Shape() {
} }
} }
function TextField() {
/*From the ActionScript reference:
To create a text field dynamically, you do not use the new operator.
Instead, you use MovieClip.createTextField(). The default size for a
text field is 100 x 100 pixels.
*/
this._x = 0;
this._y = 0;
this.textHeight = 100;
this.textWidth = 100;
this.text = "";
this.draw = function(frame,frame2,r) {
}
}
var _rootFrame = new Frame() var _rootFrame = new Frame()
var _root = new MovieClip() var _root = new MovieClip()

View File

@ -1408,6 +1408,9 @@ class Text (object):
+" text=\""+self.text+"\" color="+self.fill.rgb+" size="+str(self.font.size)\ +" text=\""+self.text+"\" color="+self.fill.rgb+" size="+str(self.font.size)\
+"pt\n" +"pt\n"
return retval return retval
def print_html(self):
retval = "var "+self.name+" = new Text();\n"+self.name+".text = \""+self.text+";\n"
return retval
class framewrapper (object): class framewrapper (object):