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

#2107 Restore linkageClassName for object extending flash.display.Bitmap
Author: user Cupral
Date created:
Type: question
Visibility: Everybody
Assigned to:
State: opened Help

> What steps will reproduce the problem? Having a display object extending flash.display.Bitmap, mx.core.FlexBitmap or mx.core.BitmapAsset > What is the expected output? What do you see instead? I would expect in linkageClassName reported in DOMDocument.xml as before. It is removed instead. > What version of the product are you using? Is it "nightly build"? Which operating system do you have? 19.1.2 > Please provide any additional information below. If the problem is related to a SWF file, attach it here, otherwise we can't help you. Embed tag modification removed the linkageClassName attribute in DOMDocument.xml descriptor. It has been preserved only for objects extending flash.display.BitmapData. I think it must be preserved also for objects extending flash.display.Bitmap.
user
Modification has been introduced in com.jpexs.decompiler.flash.xfl.XFLConverter class, with change: Added AS3 - Show Embed tag over asset classes (readonly) Added AS3 - Checkbox for exporting assets embedded using `Embed` (-exportembed in commandline) Added FLA export - AS3 - Using `Embed` tag for DefineBinaryData, images not extending BitmapData https://github.com/jindrapetrik/jpexs-decompiler/commit/4eabf892910c4e1b2b99fbc2085c7bc20b bc4858 In the following code lines: if (characterClasses.containsKey(symbol.getCharacterId())) { String className = characterClasses.get(symbol.getCharacterId()); boolean isBitmapData = false; for (ABCContainerTag c : swf.getAbcList()) { int classIndex = c.getABC().findClassByName(className); if (classIndex != -1) { ---> if (swf.getAbcIndex().isInstanceOf(c.getABC(), classIndex, DottedChain.parseNoSuffix("flash.display.BitmapData"))) { isBitmapData = true; } break; } } if (isBitmapData) { writer.writeAttribute("linkageExportForAS", true); writer.writeAttribute("linkageClassName", characterClasses.get(symbol.getCharacterId())); } //if it's not BitmapData, then it should use Embed }
admin
I tried assigning class of flash.display.Bitmap, mx.core.FlexBitmap or mx.core.BitmapAsset in Flash CS6 editor and it did no allow me to. The class needs to be BitmapData for assignment in Flash CS6 to work. Does it work in Flash CC or Animate? In 19.1.2, images which have assigned classes other than BitmapData are exported with [Embed] metadata tag, which should result in the same SWF.
admin
I tried to compile in Animate now and it gives "The class XXX must subclass 'flash.display.BitmapData' since it is linked to a library symbol of that type. See attachment. Although flash player allows Bitmap class to be assigned to image, the flash generators like Flash CS6, Animate, etc. require subclassing of BitmapData. Otherwise it won't compile. So we do not put the classname assignment to FLA when it is not BitmapData - instead the Embed tag is used.
State: new→opened
Type: bug→question
user
Actually I'am using the software only for decompiling an swf so i cannot manipulate source code directly. Do you plan to change actual implementation, or I have to stick to the 18.5.0 version?
admin
Stick with whatever version you like, but the FLA/XFL decompilation in 18.5.0 is wrong, you cannot have linkageClassName in DOMDocument.xml for an image if its not BitmapData subclass. That FLA/XFL cannot be compiled this way.