Reputation: 4135
I have never worked with flash (SWF) before but I am in a situation where I need to modify an old flash object used internally on a site. The problem is that the flash object contains a year picker that stops with 2021 which is a problem now.
The source code is not available anymore (it's nearly 10 years old) but I have managed to decompile it using an online service and thus obtaining the source. I also found the year picker's definition, which goes like this:
...
{
label:"2020",
data:"2020"
}, {
label:"2021",
data:"2021"
}];
So the actual change is easy enough, but how do I proceed from here?
I have no idea how to compile flash, and there is no make file etc which I guess is normally used.
How do I compile the flash object again from the modified source?
Note: For various reasons it is not an option to simply skip the flash object and building the same functionality using HTML.
Upvotes: 2
Views: 3115
Reputation: 4135
Based on the suggestions from Organis, this is what I did.
Found the relevant section which looked like this:
...
{
"label":"2020",
"data":"2020"
},{
"label":"2021",
"data":"2021"
}];
I tried editing the source code, but it didn't work. Got a namespace error.
Instead I edited the P Code in the right pane. It looked like this:
pushstring "label"
pushstring "2022"
pushstring "data"
pushstring "2022"
newobject 2
...
newarray <number of years>
Note that array length had to be adjusted to the total numbers of years in the range
Furthermore I had to increase the stack size etc because the Flash object crashed when loaded. I increased all these values a little by trial-and-error.
body
maxstack 17
localcount 3
initscopedepth 15
maxscopedepth 17
Hope it helps somebody in a similar situation.
Upvotes: 3