JPEXS Free Flash Decompiler Issue Tracker

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

NEW : We have got a new blog where we post some interesting SWF internals info.

List of issuesList of issues

#1696 How do I save an adjusted Matrix for a Placeobject2 tag?
Date created:
Type: question
Visibility: Everybody
Assigned to:
State: closed Help

I am attempting to make an automated system for adjusting Sprite Placeobject matrices. For testing purposes, I loop through every Place Object and set its Matrix.translateX to 5000. This change does take effect in the SWF, but when saving it to a file the change is not saved. The attached java project should allow you to replicate this. Any suggestions on what I'm doing wrong?
DownloadTranslateIssue.zip (4,209 KiB)
admin
As far as I remember, it is needed to call setModified(true) on the tag to modifications to take effect. It is not very clear, maybe I should write in in the FAQ. So in your case: MATRIX mat = PO.getMatrix(); mat.translateX = 5000; PO.setMatrix(mat); PO.setModified(true); //crucial replaceTag call is not needed. Let me know whether this worked for you.
State: new→opened
user
That fixed it! Thanks! I tried a bunch of stuff with SetModified, but it never worked, so I must have been putting it in the wrong spot. Or perhaps cancelling it out with ReplaceTag.
admin
Good, you're welcome. I modified Library documentation in FFDec wiki with similar sample for people to catch it. https://github.com/jindrapetrik/jpexs-decompiler/wiki/Library
State: opened→closed