Introduction
Action Script Replacer is a Win32 utility application that lets you replace actionscripts in Flash movies (SWF files).

Action Script Replacer

With ASR you can;
  • See all the scripts in a SWF file. (SWF version 8 and below, Flash 8, Flash MX 2004 -7.0, 7.0.1, 7.2-, MX, 5, 4, 3 generated SWF files officially supported)
  • Replace any script with another compatible script that resides in another SWF file (with batch replace option).
  • Insert/Append a frame actionscript to any frame on any timeline (with batch insert option).
  • Append a frame to any timeline.
  • Change the order of InitClip actions.
Other highlights are:
  • You can see and modify simple movie information (like frame rate, background color etc.), and also add/edit the special tags MetaData, FileAttributes and ScriptLimits.
  • You can view the scripts as P-code (the bytecode source) or as __bytecode__ functions.
  • You can display class scripts as AS1 or AS2.
  • Shares the latest decompiler engine used by Action Script Viewer.
  • You can open SWF files embedded in projectors, ZIP files and other EXE files.
To avoid any misunderstandings, with ASR;
  • You cannot delete actionscripts (but you can replace a script with an empty one).
  • You cannot add a button or movieclip script/clip action. (You can modify only existing scripts by replacing them and you can add scripts to frames only).
  • You cannot save a SWF back into an EXE, if opened from there. (You can only save as the modified SWF as a standalone SWF file).


Installation
Copy all the files in the zip to a folder and run ASR5.EXE (ASR does not have an installer/uninstaller and we consider this as a feature).

ASR 5 requires license file to run. If the zip file you have received or downloaded does not include the file ASR5.PKE, you must also copy this file (sent to you separately) to the same folder. Otherwise, ASR will not run.

Notes:
To view the preview in Insert Frame Script Frame Selection Dialog you need to have the Flash OCX ActiveX plug-in installed.

ASR works and is tested on Microsoft Windows 95/98/ME/NT/2000 and XP. ASR 5 supports SWF files version 8 and below.

Note that though ASR supports Windows 95 and Windows NT, Flash Player 8 doesn't, so you won't be able to preview SWF 8 content effectively on these systems.

ASR does not write to Windows registry or create any file other than mentioned in the Uninstallation section below.

ASR does not try to connect to Internet or try to send or receive any data from Internet. However, Shockwave Flash ActiveX Player used for previewing might do so.

UnInstallation
Delete the files you copied and also the files ASR5.INI (which ASR creates when first run), LastExtracted.swf if it exist. There is no uninstaller supplied.

Also ASR might create temporary files in the OS temporary files folder when extracting SWF files, which are normally deleted by ASR. However, on abnormal termination or OS crash these files may remain there. You may remove them manually, if necessary. Any automated disk cleaner type application will delete the files in the temporary folder.


What's New?
Version 5.28
  • ASR now shares the updated decompiler engine with ASV 5.28.
Version 5.25
  • ASR now shares the updated decompiler engine with ASV 5.25.
  • Memory Manager updated.
    ASR will now use memory more efficiently which will help especially with big SWF files.
  • New Find Bar lets you search the 'Location' and 'Instance of' columns of the list.
    (Visibility toggled by using Options > Show Find Bar for the List command).
  • Set Display Font... command menu placement changed. Moved up before the Change Script Font... command.
Version 5.21
  • ASR now shares the updated decompiler engine with ASV 5.21.
Version 5.20
  • ASR now shares the updated decompiler engine with ASV 5.20.
Version 5.16
  • ASR now shares the updated decompiler engine with ASV 5.16.
Version 5.15
  • ASR now shares the updated decompiler engine with ASV 5.15.
  • Naming convention for extracted SWFs has been changed.
Version 5.12
  • ASR now shares the updated decompiler engine with ASV 5.12.
  • SWF Metadata editing does not require the data to be XML now. Also the issue with certain languages is solved.
  • New File properties button in Movie Information dialog.
Version 5.11
  • Enhanced the way ASR saves the SWF elements that are not modified.
  • New import option 'Fix certain invalid jumps', related to the above enhancement.
    ASR was not able to (just open and) save some obfuscated SWF files, because actions were moved to other tags and ASR won't preserve the tag order when saving. We didn't add even a single line of code to bypass this obfuscation. Our goal was to have ASR save a working file. Actions for those files most probably won't show correctly (though in some cases they may). Replacing actionscripts for those files will now work as expected, provided that new import option is selected.
  • Various decompiler enhancements and bug fixes.
  • Note: No modification to ASR was necessary as a result of released official SWF specs.
Version 5.10
  • Better Unicode support (available on Win 2K and XP). Display font can now be set by user.
  • Various decompiler enhancements and bug fixes.
Version 5.00
  • ASR now supports SWF 8 format and shares the latest decompiler engine with ASV 5.0.
  • With the rearranged Movie Information Dialog, MetaData, FileAttributes, as well as ScriptLimits tags can be viewed and edited.
  • SWF extraction enhanced.
  • Various bug fixes.
Version 2.08
  • ASR now shares the latest decompiler engine with ASV 4.086.
  • Actionscript Import Options Dialog added.
  • Suppress Error Log option added to Options Menu.
Version 2.07
  • ASR now shares the latest decompiler engine with ASV 4.085.
Version 2.06
  • ASR now shares the latest decompiler engine with ASV 4.084.
Version 2.05
  • ASR now shares the latest decompiler engine with ASV 4.083.
  • Various minor bug fixes.
Version 2.04
  • ASR now shares the latest decompiler engine with ASV 4.081.
Version 2.03
  • ASR now shares the latest decompiler engine with ASV 4.08.
  • Batch Replace Script capability added.
  • Batch Insert Frame Script capability added.
  • Interface enhancements and various minor bug fixes.
Version 2.02
  • ASR now shares the latest decompiler engine with ASV 4.07.
  • Tested with Flash MX 2004 7.2, support for FSCommand2 added.
  • 'Do not show Actionscripts' option added.
Version 2.01
  • Now ASR shares the latest decompiler engine with ASV 4.06.
Version 2.00
  • Now ASR supports SWF version 7 (Flash MX 2004) and shares the decompiler engine with ASV 4.02.
  • The scripts can be sorted by clicking on column headers in the main window.
  • Class InitClip scripts are shown with the [image] icon.
  • ASR now can add a ScriptLimits tag and/or modify the first ScriptLimits tag.
  • ASR can now has __bytecode__ and AS2 display options for scripts.
  • ASR can now open SWF files in ZIP files and UPX compressed executables.
Version 1.03
  • Updated Decompiler Engine to the latest.
Version 1.02
  • Updated Decompiler Engine to the latest.
Version 1.01
  • Updated Decompiler Engine to the latest.
  • Now the decompiler preference for displaying some obfuscated files is selected by default.
  • Now the decompiler preference to show P-codes in more readable Flasm format is selected by default.


Usage
You can open a SWF file either by using the Open command on the File Menu or the toolbar, or dragging and dropping a SWF file to the ASR window.

You can also open embedded SWF files in projector or other EXE files.

(Note that for some SWF files, most of the time produced or modified by 3rd party applications, errors or warnings will be displayed. After modifying and saving, make sure you test those files more).

All the scripts in the SWF will be listed. You can sort the columns by clicking on their headers.

When you select a script, decompiled actionscripts will be shown at the bottom. You can select options for how the actionscripts are displayed using the Options Menu.

You can;
  • Replace an actionscript (see below)
  • Insert/Append a Frame Script to any frame(see below)
  • Append a frame to any timeline (see Insert Frame Script Dialog).
  • Change the order of InitClip Actions (see Actions Menu).
  • Batch replace scripts or batch insert frame scripts. (see File Menu).
Save As the SWF after your are done. ASR will warn you if the SWF is modified and not saved when you are closing the application.

Find Bar

Using the Find Bar, you can search for text, case-insensitively, in the 'Location' and 'Instance of' columns of the list. Press Enter or click the Find Next button, the icon, to perfom the search. Press ESCape to exit the edit box.

You can toggle the visibility of the Find Bar using Options > Show Find Bar for the List command.

How to Replace an Actionscript
  1. Select the actionscript that needs to be changed.
  2. Press the Replace Script button on the toolbar (or choose the command in Actions Menu).
  3. Select the SWF file which contains the desired actionscript. This SWF file must have been prepared beforehand (see below).
  4. Select Script Dialog will be displayed and compatible actionscripts will be listed. Select the desired script and press OK button to replace the script.
  • To avoid any incompatibilities, it is recommended that the source SWF file is of the same SWF version as the current one. You can simply copy the selected script (F9), paste it to Flash, do any modification, and export it as the same SWF version (shown in Movie Information Dialog).
  • When replacing Frame Actions, source SWF must contain frame actions. To achieve this, you can create a new movie in Flash, add desired actions to any frame, and export the SWF.
  • When replacing Button Actions, source SWF must contain a button with actions. You can create a new button in Flash, place an instance of it on timeline, and add desired actions to it. However, if the selected button is of Type 1, indicated with [image] icon, which can only have on(release) event, the new button must also have actions for on(release) event.
  • When replacing Clip Actions, source SWF must contain a movieclip with clip actions. You can create a new movieclip in Flash, place an instance of it on timeline, and add desired actions to it (within onClipEvent() handler).
  • When replacing InitClip Actions, the selected SWF must contain either frame actions or InitClip actions, which are compatible. It will be easier to create frame actions in Flash. (If you create InitClip actions, only the body of the script will be used anyway, the #initclip pragma and the order parameter will be ignored). After replacing the script, you can change the order parameter using Move InitClip Action Down / Up commands.
  • Component Parameters are shown as Clip Actions (such as visible = true;) , since this is how they are implemented in SWF format. These actions will be shown as onClipEvent (initialize) (version 6) or onClipEvent (construct) (version 7 and above) blocks.To replace Component Parameters, you need to create a new movieclip in Flash, place an instance of it on timeline, and add the appropriate onClipEvent block.
How to Insert a Frame Script
  1. Press the Insert Frame Script button on the toolbar (or choose the command in Actions Menu).
  2. Insert Frame Script Dialog will be displayed. Select the timeline and frame that the script is to be inserted.
  3. Press the "Next" button and select the SWF file which contains the desired frame scripts. This SWF file must have been prepared beforehand.
  4. Select Script Dialog will be displayed and compatible actionscripts will be listed.
  5. Select the desired script, and press the "OK" button. The script will be inserted to the frame and added to the main actions list.


Memu Items

Menu Items
File Menu (ALT+F)
Open (F3) | Displays the File Open Dialog to open a SWF file.
Save as (F2) | Prompts for a file name and lets you save the current SWF.
Batch> Replace Script | Displays the Batch Replace Script Dialog. Lets you replace scripts in many SWF files in a batch operation.
Batch> Insert Frame Script | Displays the Batch Insert Frame Script Dialog. Lets you insert frame scripts to many SWF files in a batch operation.
Movie Information (F6) | Displays the Movie Information Dialog.
[Most Recently Used 8 Files] | Selecting a filename will open the file.
Exit | Closes ASR. If the open SWF is modified, you'll be asked to confirm the action.

Actions Menu (ALT+A)
Replace Script (ALT+R) | Lets you select a SWF file, then select a compatible script in the file to replace the current selected actionscript.
Insert Frame Script (ALT+I) | Displays the Insert Frame Script Dialog.
Move InitClip Action Up Move InitClip Action Down | InitClip Actions are used for one-time initializations of movieclips or components. In Flash, they are entered on the first frame of a movieclip, within #initclip #endinitclip actions. When there are multiple InitClip Actions, the order of execution is determined by the Order parameter of the #initclip action. However, when the SWF file is exported, this parameter is not preserved as a number; it just determines the order that these scripts are found in the file. When ASR decompiles these scripts, a parameter is shown with #initclip action to reflect the file order. You cannot edit this shown parameter directly or by replacing, but you can change the file order, using the up and down commands. These buttons are enabled when initclip actions are selected. Use up command to decrease the order parameter, and use down command to increase it. (You cannot decrease the order for #initclip 1, and you cannot increase the order for the last #initclip).

Options Menu (ALT+O)
Suppress Error Log | When this command is checked, Error Log Dialog will not be displayed. This is not recommended normally. However if you encounter repeated errors you might consider suppressing the error log display to avoid the inconvenience.
Actionscript Import Options... | Displays the Actionscript Import Options Dialog.
Set Display Font... | Displays the Font Dialog and allows you to change the display font, which is mainly used by the list. (To change the actionscript font, see Change Script Font below).
Change Script Font (CTRL+ALT+F) | Displays the Font Dialog and allows you to change the font.
Word-wrap (CTRL+W) | Turns on/off word wrapping.
Show Long Scripts (CTRL+G) | When this option is checked, actionscripts will be fully decompiled and shown. Otherwise, only a few lines for each script will be shown.
Colorize (CTRL+ALT+Z) | Turns on/off colorizing for actionscripts.
Enable \u Escapes (CTRL+ALT+U) | Turns on/off displaying \u escapes. When \u escapes are enabled, ASR displays non-ASCII characters as \u escape sequences. Otherwise the characters not found in the current font will be displayed as question marks (?). This option is only available for SWF version 6 (and above) files.
Show P-code Source (F11) | Actionscripts in SWF files are actually stored as a stream of simpler actions that the Flash player interprets, which ASR decompiles back to readable actionscript. This option is provided in case you need to see these original actions.
Show Actions as Bytecode (ALT+F11) | When this option is selected, actionscripts will be shown as __bytecode__ functions, with the hexadecimal bytecode passed as the parameter. When this output is copied to Flash MX / Flash MX 2004 / Flash 8 and recompiled, the exact actionscript will be exported, however with an extra 'pop' action appended to the end of the actionscript. This pop action does not cause an error with the player, but when opened with ASV/ASR causes 'creating dummy expression' warnings. Also, if the actionscript is in a button, this __bytecode__ action causes an error when Flash exports the actionscript. ASV Decompiler Engine will add an extra 'undefined;' line before the __bytecode__ function to work around this problem.
Enable AS2 Mode (CTRL+F11) | This option is available for SWF versions 6 and above. When selected, class actionscripts are detected and converted to recompilable ActionScript version 2. When unselected, the scripts are shown as is (ActionScript version 1). When AS2 mode is not selected, 'Creating dummy expression' warnings will be shown for class scripts; this is normal.
Show Find Bar for the List | When this option is selected, Find Bar, which lets you search for text in 'Location' and 'Instance of' columns of the list, will be visible below the main toolbar.
Do not show Actionscripts | When this option is selected, actionscripts will not be shown. This is only for extereme cases when an actionscript casues an error with ASR or takes too much time to decompile. If you know which script to change with which, you can use ASR in this mode to avoid any decompiling errors or long decompile times.

Help Menu (ALT+H)
Contents (F1) | Displays the help contents (this file).
Check Version | Opens the Internet browser to check for the latest available version of ASR.
About | Displays the About Dialog, where you can see the product version and registered user information.


Select Script Dialog
This dialog lets you select an actionscript from a SWF file.

Compatible actionscripts found in the SWF are listed on top. There are four types of scripts in a SWF file:
  • Frame Action: Actions on a frame, either on main timeline or a movieclip's timeline.
  • Button Action: Actions associated with button events. (Buttons that only support on(Release) actions will be indicated with [image] icon).
  • Clip Action: Actions associated with movieclip events.
  • InitClip Action: Actions that initialize a movieclip. In Flash, these actions are entered on the first frame of a movieclip within #initclip pragma.
  • InitClip Action (for classes): These are InitClip actions for classes in Flash MX 2004 / Flash 8.
The selected script will be decompiled and shown in the text box below. The actionscript viewing options selected on the main menu also apply here.

After selecting the desired script, click OK to confirm, or Cancel to cancel the operation.


Batch Replace Script Dialog
This dialog lets you replace a chosen script within multiple SWF files, with another chosen script. This dialog can be displayed using File> Batch> Replace Script... menu command.

Files to Process
Folder is the path that the SWF files to be modified are in. Write (or paste) the path into the edit box or click '...' to browse for folder.

Select Process Subfolders option if you also want the subfolders to be searched for SWF files.

Existing Script
Click Browse for Script to select the script that will be replaced. This script must exactly match the script that you want replaced, so it's best to select it from one of the SWF files in the selected folder. Selected script will be shown in the Preview area.

New Script
Click Browse for Script to select the script that will be used for replacing the existing scripts. This script can be selected from any SWF file, but you will be able to select only compatible script types with the Existing Script. Selected script will be shown in the Preview area.

Options
Normally the version of source and target SWF files should match. When Ignore SWF version conflicts option is selected, the SWF version mismatches will be ignored. When not selected, a SWF file will not be modified if its version is not the same as the SWF file used for the Existing Script.

OK Button
Click OK to start batch processing. Bath Processing Dialog will be shown.


Insert Frame Script Dialog
This dialog lets you select the frame to insert a script. Also you can append frames to any timeline here.

You can select the timeline from the dropdown list (either main timeline or a movieclip's timeline). The frames of the selected timeline are listed below.

Frames that already have actions on them are indicated by an action icon: .

You can select an existing frame, or append a new frame and select it. A preview of the selected frame will be shown, however actionscripts are disabled here and this preview is mainly for identifying symbols.

Append Frame
Click Add a Frame to End to append a new frame. This frame will still contain the symbols on the last frame. To add an empty frame, have the checkbox selected before pressing the button.

Next Button
This button is enabled after a frame has been selected. Click Next to continue to open a SWF file and then select the script to insert. If the selected frame already has actions, the new script will be appended to the existing script.

Close Button
Click Close to cancel inserting script. However, if you have added new frames, they will not be deleted.


Batch Insert Frame Script Dialog
This dialog lets you insert a chosen script into multiple SWF files. This dialog can be displayed using File> Batch> Insert Frame Script... menu command.

Files to Process
Folder is the path that the SWF files to be modified are in. Write (or paste) the path into the edit box or click '...' to browse for folder.

Select Process Subfolders option if you also want the subfolders to be searched for SWF files.

Script to Insert
Click Browse for Script to select the script that will be inserted.Only frame and initclip script types can be selected. Selected script will be shown in the Preview area.

Options
Timeline
Select the timeline to insert the script to; main timeline or timeline of a movieclip. Enter MovieClip Symbol ID if movieclip timeline is selected.

Frame
Enter the frame number here.

As #initclip
If MovieClip Timeline is selected and the selected script is an initclip script, this option enables to insert the script as an initclip script, or as a regular frame script if the option is not checked.

Insert to frame start/end
If the selected frame already contains scripts, this option determines how the new script is added. Select 'Insert frame to end' to append the new script to the existing script, or select Insert frame to start' to prepend it. If 'as #initclip' option is selected, this option makes the new script to be the first/last initclip script in the SWF.

Ignore SWF version conflicts
Normally the version of source and target SWF files should match. When Ignore SWF version conflicts option is selected, SWF version mismatches will be ignored. When not selected, a SWF file will not be modified, if its version is not the same as the SWF used for the Script to Insert.

OK Button
Click OK to start batch processing. Bath Processing Dialog will be shown.


Batch Processing Dialog
This dialog is displayed during either batch replacing or inserting scripts and provides a log for reviewing the results.

You can click Cancel or press Escape to stop the process. You can click Close or press Escape to dismiss the dialog after the batch processing is completed.

You can Copy or Save the log text to a file using the left-bottom buttons.


Movie Information Dialog
Main properties of the movie are shown and can be modified through this dialog.

General Tab

Location:
Location of the SWF movie on the disk. You can select and copy the contents of location using its context menu or keyboard.

SWF Version:
Version of the SWF file. ASR 5 supports SWF version 8 and below.

Compressed:
Shows if the SWF is compressed or not.

If the file is compressed clicking on 'Details' will bring a message box displaying the file size on disk, uncompressed size and the compression algorithm. If the file is not compressed, file size in bytes will be displayed in paranthesis.

ASR will save compressed SWFs compressed and uncompressed SWFs uncompressed.

Width:
Width of the SWF movie in pixels.

Height:
Height of the SWF movie in pixels.

Frame Rate:
Frame rate of the SWF movie in fps (frames per second).

Frame Count:
Frame count of the SWF movie.

Background Color:
Background color of the SWF movie, shown in hexadecimal (HTML compatible) format. Also a preview of the color is displayed in a black frame.

Bounding Rectangle:
Bounding rectangle of the SWF movie in pixel coordinates (left, top)(right, bottom). If the first coordinate is (0,0) then the second coordinate will be (width, height).

Center:
Coordinate of the center of the SWF movie calculated from the bounding rectangle coordinates.

Click Edit to open the Edit Movie Properties Dialog.

Click File Properties to open Windows file properties dialog. (This buton will only be available if the open SWF has an associated file).

Metadata Tab

This tab displays the SWF Metadata, if present.

SWF Metadata:
If the Metadata tag exists in the SWF, contents of the tag will be displayed as a tree structure.

Click Edit to edit the metadata.

If a Metadata tag does not exist in the SWF, 'not present' will be shown.

Click Add to add the Metadata tag, which will open Edit SWF Metadata Dialog to enter the data. This tag ignored by players version 7 and below but 3rd party applications and search engines will use the data.

Click Delete to delete the SWF Metadata tag.

Special Tags Tab

Script Limits Tag:
The ScriptLimits tag determines how much tolerance the player will show while executing actionscripts before displaying the warning dialog to abort the execution. If the tag doesn't exist, default values are used. This tag ignored by players version 6 and below.

If a ScriptLimits tag doesn't exist in the SWF, values will show as '-'.

Click Add to add the ScriptLimits tag, which will open a dialog to enter the data.

If the ScriptLimits tag already exists, Max Recursion Depth and Script Timeout Seconds values will be shown.

Click Edit to modify the existing ScriptLimits tag.

Click Delete to delete the ScriptLimits tag.

File Attributes Tag:
The FileAttributes tag determines the Local playback security model for the SWF, and also contains the information regarding to whether the Metadata tag is present or not. This tag ignored by players version 7 and below.

If a FileAttributtes tag doesn't exist in the SWF, the two fields will show '-'.

Click Add to add the FileAttributes tag, which will open a dialog to select the Local playback security.

If the FileAttributes tag already exists, its contents will be shown.

Click Edit to modify it.

Click Delete to delete the FileAttributes tag. Note that if SWF Metadata exists ASR will automaticaly add the FIleAttributes tag when saving the file.


Edit Movie Properties Dialog
You can modify Bounding Rectangle (width, height), Frame Rate and Background Color properties of the SWF movie using this dialog.

Bounding Rectangle
Bounding rectangle coordinates are displayed and can be modified. As you edit values, new movie width, height and center properties are updated real-time. You can revert to the original value by clicking Reset.

Frame Rate
Current frame rate of the movie in fps (frames per second) is displayed; you can modify it or revert to the original value by clicking Reset.

Note: If you enter a floating point value, it might get rounded due to limitations in SWF format.

Background Color
Background color is displayed both as a hexadecimal value and as a preview in a black rectangle. You can edit the value or click on the color preview and choose a color. Clicking Reset lets you revert to the original value.


Edit SWF Metadata Dialog
You can edit the SWF Metadata using this dialog.

Three different views are provided in tabs for editing.

Edit Standard Values Tab

You can edit 'Title', 'Description' and other standard elements of the metadata here. 'Title' and 'Description' have their own entry fields, because they are the standard elements Flash 8 IDE lets editing. For editing other elements, you will need to first choose the element.

All elements and value fields will display a tooltip description taken from Dublin Core Metadata Initiative. (http://dublincore.org/documents/dces/).

Editing via this tab is not available if the data is not valid XML with rdf:RDF root.

Edit XML as Tree Tab

You can edit the Metadata XML as a tree in this tab.

You can Delete selected node, Add a child node or edit node values.

Editing via this tab is not available if the data is not valid XML.

Edit Raw Text Tab

Raw XML text is displayed in this tab for editing. You can also paste the text from another application.


Select SWF Dialog
When you open a non-SWF file with ASR, whether by opening it with the open file dialog or by dragging and dropping the file, ASR searches and tries to find a SWF file embedded in the file. (SWC files which contain compiled clips for Flash MX 2004 and later are in ZIP format).

Note that ASR cannot save the modified SWF into another file, it can only save a SWF movie as a standalone SWF file.

SWF Search Details
If the file UnzDll.dll is present in the same folder, ASR will also unzip ZIP files and ZIP files embedded in other files. If a ZIP file contains other ZIP files, those files will also be extracted and searched.

If the file upx.exe is present in the same folder, ASR will decompress UPX compressed executables first before searching.

If ASR cannot find the external files mentioned above, it will silently disable the feature. If you don't need ZIP or UPX extraction, you can safely delete the UnzDll.dll and upx.exe from the ASR folder. UPX and ZIP extraction is useful most of the time for extracting SWF files from projectors created by 3rd party applications. Note that ZIP extraction is also used to extract SWF files in SWC files.

When ASR searches a file, it looks for the SWF signature. It is possible that a found file is not a SWF file at all.

If no SWF files are found, you'll be presented with a message box displaying 'No SWF files were found.'

If only one SWF candidate is found, it is opened.

If more than one SWF candidates are found 'Select SWF Dialog' is displayed.

At top, the filename is displayed.

In the list, SWF version, size and name of the file are displayed. Name of the file includes Hex offset for the found SWF candidate.

While this dialog is open, you can copy a SWF candidate by draging and droping from the list. Keep Shift key pressed during this operation to copy all listed files.

Open Button
Click Open to open the selected SWF candidate. Last extracted SWF file is saved as 'LastExtracted.swf' in the same folder as ASR5.EXE.

Preview Button
Click Preview to open the selected SWF candidate with the application associated with SWF files. (If you have Adobe/Macromedia Flash installed, this should be the Standalone Flash Player).


Actionscript Import Options Dialog
This dialog lets you change the Actionscript import options.

Note that most of the time you will need to re-open the SWF file for the changes in these options to take effect.

Safe actionscript import (Recommended)
Some SWF files may contain invalid data or code that is never executed (dead code). Generally, these are obfuscated files but there may also be dead code in SWF files created by Flash.

When this option is selected ASR will try to eliminate dead code while importing actionscripts.

Do not show 'Dead Code Removed' warnings
When selected, 'Dead Code Removed' warnings will not be included in the Error Log dialog.

Import valid dead jumps
When 'Safe actionscript import' option is selected, certain Jump actions that are eliminated may cause the script structure to change and warnings to be displayed. Even in some extreme cases, the resulting structure may be not decompilable.

When this option is selected, certain Jump actions that seem safe to import are not eliminated.

Eliminate redundant jumps
When selected, ASR will try to eliminate redundant Jump actions in some obfuscated SWF files while importing actionscripts. This option is needed only for some obfuscated SWF files and is off by default, since it may slow down the import procedure a bit. Also, very rarely some actionscript structures may show different though they will be equivalent. Level 2: When selected, ASR will eliminate redundant jumps more.

It is recommended that you keep these options unselected unless you are getting a lot of 'unexpected jump' comments in the decompiled actionscript.

Resolve certain invalid jumps
When selected, ASR will resolve certain invalid jumps that target outside the current actionscript tag.

Safe import alternate evaluation
When selected, ASR will use alternate evaluation for some actions while importing actionscripts. Changing this option may be needed only if some obfuscated SWF file cannot be decompiled.

Detect dead code more
When selected, ASR will try to detect code sections that never execute more.

Disable adjusting for invalid action length
When importing actionscripts ASR adjusts action offsets using the length value stated in actions. When this option is selected it might help ASR to import previously not-imported actions due to a wrong length value stated in another action. Enabling this option is not recommended for normal usage.

You can try selecting this option when you encounter 'Possible parse error, adjusting for action length' warnings.

Ignore length for Push actions
The 'Disable adjusting for invalid action length' option excludes Push actions. When this option is selected, the length of Push actions will be ignored. Invalid length in Push actions are usually found in obfuscated SWF files. We recommend selecting this option only if some obfuscated SWF file cannot be decompiled.

Stop at End actions
Flash Player stops executing a script when an End action is encountered. When this option is selected, ASR will also stop decompiling at End actions (if the remaining part is never executed). If 'Do not show warnings' option is not selected, ASR will show a warning when an unexpected End action is encountered, whether it stops decompiling or not.

Fix certain invalid jumps
Similar to 'Resolve certain invalid jumps' option, when selected certain jumps that target outside current actionscript tag will be fixed by copying the out-of-tag data to the current tag. Note that when you save such a file, duplicated actionscript data will remain in now unused tags, making the SWF file size, (depending on actionscript size) a little bigger (These tags can be deleted by other applications such as ASV).


Decompiler Preferences
ASR shares the same decompiler engine with ASV (Action Script Viewer). Though ASV provides a dialog to change all preferences including 'Decompile' and 'AS Import' options, ASR only provides a dialog for actionscript import options.

You can change the remaining preferences for ASR by editing the ASR5.INI file. Also you can copy the preferences section from your ASV40.INI or ASV5.INI file, if you have ASV and have your preferences set there.

Some of the preferences ASR supports are:

SaveCompressed
If not set, ASR will save all files uncompressed.

MaxCompress
If set, ASR will save compressed files with 'Maximum Compression' option. Note that this is not of much use most of the time.

EnableASNativeComments
If set, ASR will display ASNative comments.

EnableOtherComments
If set, ASR will display some other comments.

DontUseEval
If set, ASR won't wrap invalid variable names with eval statements.

MXColors
If not set, ASR will use old ASV style syntax highlighting.

UppercaseRes
If set, ASR will try to correct some scripts using reserved words as variables.

DEBUGACT2
If set, ASR will display actionscript data in P-code view. Else the data will be displayed in more readable Flasm format.

_ASVREG
Flash MX 2004/Flash 8 exports SWF files (version 6, 7 or 8) with register-optimized actionscript. In order to decompile an optimized script correctly, registers must be treated as temporary variables. Registers will be shown as '_local1', '_local2'... etc. You can change the name of this variable here.

Unused and absent function2 arguments will be renamed with prefixes _arg and _param. This option is not configurable in ASR.


About
Action Script Replacer 5.28 (August 6, 2007)

Publisher
Burak KALAYCI (burakk@buraks.com)

Credits
Production Consultant: Burak KALAYCI (burakk@buraks.com)
Lead Programmer: Tolga KALAYCI (tolga@buraks.com)

Copyright © 2003-2007 Manitu Group, Istanbul, Turkey.

Thanks (in alphabetical order)
Benjy (www.newdimension-fr.net)
indo-diver
Maciej Maliborski (www.flashzone.pl))
Mike80
Russell Peters (www.delphizip.net)
Snow (snowdev@hotmail.com)
Urami (www.FlashFugitive.com)
Wassim

History
2005 October 20 | Version 5.00 (versions 3 and 4 skipped)
2003 November 25 | Version 2.00
2003 April 12 | Initial release (v1.00)

Contact Info
ASR Homepage: http://www.buraks.com/asr
Manitu Group Homepage: http://www.manitugroup.com
Contact e-mail: asr@buraks.com
Support e-mail: support@buraks.com
Support board: http://www.flashdecompiler.com
Wish list e-mail: wishlist@buraks.com (for new feature requests)
Snail mail address: Rihtim Cad. Izzettin Sok. 3/1 Kadikoy / Istanbul TURKEY

Acknowledgements
zLib 1.1.4 compression/decompression library by http://www.zLib.org.

The UnzDll.dll distributed with ASR is derivative work of Info-Zip (http://www.cdrom.com/pub/infozip/) by Eric W. Engler (http://www.geocities.com/SiliconValley/Network/2114/). Source available at http://www.delphizip.net.

UPX is Copyright (c) 1996-2007 Markus Oberhumer, Laszlo Molnar & John Reiser (http://upx.sourceforge.net/)

Tooltip descriptions displayed in Metadata edit dialog taken from Dublin Core metadata element set (http://dublincore.org/documents/dces/). Copyright © 1995-2005 Dublin Core Metadata Initiative. All Rights Reserved. http://www.dublincore.org/about/copyright/

Adobe and Macromedia are registered trademarks of Adobe Systems Incorporated.

All trademarks/registered names acknowledged.

ASR 5.x help revision 1.28.0


User License Agreement
END-USER LICENSE AGREEMENT FOR MANITU GROUP SOFTWARE "ACTION SCRIPT REPLACER"

IMPORTANT-READ CAREFULLY: This End-User License Agreement ("EULA") is a legal agreement between you (either an individual or a single entity) and MANITU GROUP for the software product identified above, which includes computer software and may include associated media, printed materials, and "online" or electronic documentation ("SOFTWARE PRODUCT"). By installing, copying, or otherwise using the SOFTWARE PRODUCT, you agree to be bound by the terms of this EULA. If you do not agree to the terms of this EULA, do not install or use the SOFTWARE PRODUCT; you may, however, return it to your place of purchase for a full refund.

SOFTWARE PRODUCT LICENSE
The SOFTWARE PRODUCT is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties. The SOFTWARE PRODUCT is licensed, not sold.

GRANT OF LICENSE
This EULA grants you the following rights:
·Applications Software. You may install and use one copy of the SOFTWARE PRODUCT, or any prior version for the same operating system, on a single computer. The primary user of the computer on which the SOFTWARE PRODUCT is installed may make a second copy for his or her exclusive use on a portable computer.
·Storage/Network Use. You may also store or install a copy of the SOFTWARE PRODUCT on a storage device, such as a network server, used only to install or run the SOFTWARE PRODUCT on your other computers over an internal network; however, you must acquire and dedicate a license for each separate computer on which the SOFTWARE PRODUCT is installed or run from the storage device. A license for the SOFTWARE PRODUCT may not be shared or used concurrently on different computers.
·Conditions of Use. You may only use the software on files you are authorized to view information provided by SOFTWARE PRODUCT.

DESCRIPTION OF OTHER RIGHTS AND LIMITATIONS
·Limitations on Reverse Engineering, Decompilation, and Disassembly. You may not reverse engineer, decompile, or disassemble the SOFTWARE PRODUCT, except and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation.
·Separation of Components. The SOFTWARE PRODUCT is licensed as a single product. Its component parts may not be separated for use on more than one computer.
·Rental. You may not rent, lease, or lend the SOFTWARE PRODUCT.
·Termination. Without prejudice to any other rights, MANITU GROUP may terminate this EULA if you fail to comply with the terms and conditions of this EULA. In such event, you must destroy all copies of the SOFTWARE PRODUCT and all of its component parts.

COPYRIGHT
All title and copyrights in and to the SOFTWARE PRODUCT (including but not limited to any images, photographs, animations, video, audio, music, text, and "applets" incorporated into the SOFTWARE PRODUCT), the accompanying printed materials, and any copies of the SOFTWARE PRODUCT are owned by MANITU GROUP or its suppliers. The SOFTWARE PRODUCT is protected by copyright laws and international treaty provisions. Therefore, you must treat the SOFTWARE PRODUCT like any other copyrighted material except that you may install the SOFTWARE PRODUCT on a single computer provided you keep the original solely for backup or archival purposes. You may not copy the printed materials accompanying the SOFTWARE PRODUCT.

MISCELLANEOUS
Should you have any questions concerning this EULA, or if you desire to contact MANITU GROUP for any reason, please contact at support@buraks.com

LIMITED WARRANTY
NO WARRANTIES. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MANITU GROUP AND ITS SUPPLIERS DISCLAIM ALL OTHER WARRANTIES AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE PRODUCT, AND THE PROVISION OF OR FAILURE TO PROVIDE SUPPORT SERVICES. THIS LIMITED WARRANTY GIVES YOU SPECIFIC LEGAL RIGHTS. YOU MAY HAVE OTHERS, WHICH VARY FROM STATE/JURISDICTION TO STATE/JURISDICTION.

LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL MANITU GROUP OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE PRODUCT OR THE PROVISION OF OR FAILURE TO PROVIDE SUPPORT SERVICES, EVEN IF MANITU GROUP HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN ANY CASE, MANITU GROUP'S ENTIRE LIABILITY UNDER ANY PROVISION OF THIS EULA SHALL BE LIMITED TO THE GREATER OF THE AMOUNT ACTUALLY PAID BY YOU FOR THE SOFTWARE PRODUCT OR U.S.$5.00; BECAUSE SOME STATES AND JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY, THE ABOVE LIMITATION MAY NOT APPLY TO YOU.