JPEXS Free Flash Decompiler Issue Tracker

If you are looking for the decompiler itself, visit https://github.com/jindrapetrik/jpexs-decompiler

NEW : You can now close your own issues and reopen them later if needed. You can also comment closed issues.
List of issuesList of issues

#2383 Convert DefineText to DefineEditText
Date created:
Type: feature
Visibility: Everybody
Assigned to:
Labels: Text
State: upgraded Help

I was trying to make an existing text modifiable with code so I gave the text a name and declared it as a textfield within the class but when I tried editing it I got an error: TypeError: Error #1034: Type Coercion failed: cannot convert flash.text::StaticText@d7029c1 to flash.text.TextField It looks like I need to change the DefineText to a DefineEditText but I can't figure out how to do it! Hoping this feature is possible, thanks.
Hey, wondering if you've looked into this yet or what your thoughts are about it. I have a lot of DefineText / DefineText2 records that I want to convert to DefineEditText without having to delete and recreate them all and then re-do all the dependencies, so this feature would be very helpful. Some fields might not exist in DefineEditText (like x/y offsets?) so they would probably be removed and I would change the PlaceObject's translateX/Y in a sprite unless there's a better way to do it. This is an example DefineText I want converted: [ xmin 60 ymin 80 xmax 580 ymax 220 ][ font 14 height 160 color #000000 x 60 y 180 ]watch
It is implemented in nightly 3476. Right click the text and select Convert text type. You can select multiple texts via Ctrl or Shift.
State: new→upgraded
Thanks for the feature! I first tried to convert the example "watch" DefineText chid 550 provided above to a DefineEditText. However, when I go to view it, the text is either gone or invisible, even though it looks like it would work when viewing the sprite in FFDEC. I tried tweaking some of the parameters but nothing worked. I've attached the modified swf and unmodified, as well as a PNG showing boxes with the missing watch text.
DownloadNv2-ETBug.swf (556 KiB)DownloadwatchDisappeared.PNG (2 KiB)DownloadNv2.swf (552 KiB)
It should be better in nightly 3490, try it.
Nice! Some things to consider: when I tried to edit the text it disappeared and setting the hasFont property as well as setting the fontID and fontHeight fixed it. Maybe those properties could be set when converting as well as the hasTextColor and textColor (other DefineEditText with html in my swf are set up like this too). I was modifying it like view.text = "test" instead of using htmlText prop though. Another thing is when converting, align left is set, however hasLayout is set to false, so I believe this does nothing because I tried changing align to center which didn't work. If I set hasLayout to true and then align to center it worked properly.
It is improved in nightly 3494.
Still need to add the fontHeight! It currently gets set to zero. Also the converted DefineEditText might be shifting twice, because a DefineText with params xmin 60 ymin 80 xmax 580 ymax 220 x 60 y 180 gets converted to xmin 20 ymin -40 xmax 640 ymax 260 leftmargin 60 rightmargin 0 It appears that in my swf it's shifted by 60 extra twips as well as the text being cut off by 60 twips at the end and if I change leftmargin to 0 or change the xmin to -40 it fixes the issue. Not sure which way to do it is the correct way though.