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 issues](/flash/images/issue_list.png)
#1696 How do I save an adjusted Matrix for a Placeobject2 tag?
Author:
epicsninja
![user user](/flash/images/user.png)
Date created:
Type: question
Visibility: Everybody
Assigned to:
State: closed ![Help](/flash/images/help.png)
![Help](/flash/images/help.png)
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?
![Download](/flash/images/disk.png)
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
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.
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