Some progress on HTML5 text
This commit is contained in:
parent
7d6d5a46a0
commit
affb2f3ad5
17
base.js
17
base.js
|
|
@ -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 _root = new MovieClip()
|
||||
|
|
|
|||
|
|
@ -1408,6 +1408,9 @@ class Text (object):
|
|||
+" text=\""+self.text+"\" color="+self.fill.rgb+" size="+str(self.font.size)\
|
||||
+"pt\n"
|
||||
return retval
|
||||
def print_html(self):
|
||||
retval = "var "+self.name+" = new Text();\n"+self.name+".text = \""+self.text+";\n"
|
||||
return retval
|
||||
|
||||
|
||||
class framewrapper (object):
|
||||
|
|
|
|||
Loading…
Reference in New Issue