How to update a binary component in a decompiled .swf file - actionscript-3

I am working on a project which includes use of existing .swf files developed long time back by unknown resources.
I need to update one variable in the ActionScript. The actionscript is inside the binarydata folder and if i do any changes then the template gets corrupted or im not sure what but it does not display at all.
I have no experience working in flash hence requesting some guidance.

This issue got fixed on a different machine and by using the JPEXS Decompiler.

Related

Could not load scene into memory. Your document may be damaged

today I opened my flash project in CS6 and after it opened in the output I receive this message: "Could not load scene into memory. Your document may be damaged." The only problem I saw was the flash component (textInput, and button) that I use for my project. They was transformed smaller and I can select them. :-o And the problem is that try to open the previous version of the project and I found the same error. I think the only problem is FLASH COMPONENT. How can I make everything like it was (flash component). Is something about library ?I saw in library the TextInput are appear like symbol of component (3cubes).
Thank you for help!
Possible causes / solutions:
Your .fla was originally authored on a computer with a different operating system. Try opening it on the computer it was created.
Your .fla might have been made with a different version of Flash. Make sure you are opening it in the same version of Flash.
Your .fla might have been corrupted. If you look in the folder and it says the file size is something like 7kb, then your .fla file is seriously corrupted. Hopefully you have backups if this is the case.
Unfortunately it doesn't work in some fast way so I had to change all my flash components in the library. After I changed, the new components was looked also strange. But I didn't receive that error again and I can go ahead with my project now. Thank you anyway...

FLASH AS3 EXTERNAL CLASS

I have a problem regarding as3.
I have done a flash application that include an external class in the same folder with the swf. Now the problem is, when I edit the information on the external class (using notepad++), the swf doesn't change. Its like the external class has been hard coded into the application itself.
Do I have to make some changes on the publish setting?
Thanks guys for your time. Really appreciate it.
Yes you have to re-compile your project into the swf. (at least I did when I was writing AS3 programs)
you can't just expect the swf to see your changes sitting there and re-compile itself(although it would be awesome if it did).
just re-build your flash application like you built it the first time.

AS3 to Generate Dynamic SWF?

Is it possible, using AS3, to programmatically generate a .swf file? What my little app does is load a bunch of images, using FileReference, now I want to compile them into a stand-alone swf that the user can download (the swf will be a slideshow).
[edit]
There seems to be some mis-understanding of what I am asking. I want to have one compiled swf from which the user may select some images and press a button whereby the swf will create and compile a second swf containing said images. As this is a stand-alone app, there will be no server-side interaction.
What I am thinking is that there will be a string representing a dynamic class. When the user selects their images the appropriate embed tags are added to this string, which is then compiled and saved to the user's desktop.
So my question is, can a compiled swf generate and compile a second swf?
Take a look at this library, this allows you to create a .swf at runtime.
https://github.com/claus/as3swf
It should be possible to do server side, by generating the relevant code and running the as3 compiler.
I haven't investigated the package thoroughly, but the As3Eval library seems to be doing what you're asking - realtime compilation of AS3 into executable bytecode (on the client with no server interaction). Check out the demo.
I'm not sure it would support image embedding - perhaps you could encode the image data as a base64 string in your dynamically built source code.
You could also use swfmill, a command-line tool to create SWF files from XML documents.
It's not well documented but for basic usages (such as creating asset libraries) you should find what you need.

edit actionscript from swf - compiled file

I have one swf file, it is JW Player plugin. It have one actionscript file in which is whole plugin code, and rest of files are jwplayer api files. So i need to open that file (where whole plugin code is) and edit few lines. But there is a problem, because when i try to decompile file with sothink swf decompiler (and few others) - to convert it to .FLA, decompiles simply crashes. It is because of some file from jwplayer api library. So, next thing i tried is to edit via HEX (because there is not much to be edited), but i couldn't find what i needed. So what i need is - is there any way or not? If yes, which program can be used for this?
I've had to do something similar in the past. In my scenario, the client had the SWF but no FLA. I needed to change a hardcoded url and sothink wasn't decompiling but I could view the AS in the sothink previewer. Luckily for me the flash wasn't very complex so I was able to copy the AS and graphics out and start a new project. I would imagine that JW Player is much more complex so this may not be an option for you, but thought I'd mention it anyway.
Depending on your needs, you may be able to get what you want by using the plugin API to extend the functionality or maybe even by customizing a skin.

Why isn't FlashBuilder building with updated code?

I am using FlashBuilder for a project (Actionscript Project, using AS3) that I've been working on for a few weeks now. I took a break for the holidays (naturally), and when I came back, the compiler seemed to stop working. Everytime I ran the default Actionscript application, the swf ran without my new changes.
According to the file system, the swf had been modified (though my SVN software, Cornerstone, detects no difference in the file). But, if I add in a trace statement in the constructor of the default application, it is not displayed in the console while running in debug mode (even though all other statements that were written and saved before today run fine).
I have tried Project->Clean several times. I also have changes the compiler arguments to generate a size report, however, I have another swf that is generated on build (a preloader) and the size report only includes that (even though it does modify the main swf. This even happens after a clean and it MUST generate a new main swf and preloader swf).
I have also restarted FlashBuilder, and the computer, and moved the project to a different computer, all with the same result (build not including updated code)
Any other ideas to get rid of this strange behavior?
Thanks in advance,
-Esa