ActionScript Tips

Author: David Zimmer
Date: 06.18.11 - 7:00am

I have never really had to code in ActionScript before but its obviously has quite a developed API.

This entry will house various code tidbits and resources as I stumbled across them.
  • Misc ActionScript Helper Class Features:
    • Text Logging - (trace window for any player w/scroll support)
    • Save ByteArray to File
    • Load ByteArray from File
    • Hexdump ByteArray
    • Msgbox Shellcode
    • HeapSpray
    • CreateButton w/text label
    • Download File

  • ActionScript Hexdump function
  • Shellcode2Exe now supports writeInt,writeUnsignedInt, and endian ActionScript commands

  • FlashDevelop
    • is a nice UI for ActionScript code development.
    • You can use it with the free flex sdk so you dont need Flash.
    • To use classes like the FileSystem stuff, you can use an AIR project.
    • fl.* and mx.* classes (such as UIScrollBar) are not included in the free flex sdk, however you can use them if you make your own swc file and include it in your project using a trial version of flash. (drag and drop the classes you want to the library window from the components window and click generate swc in the publish options)
    • Sample using and a swc library in FlashDevelop

  • Working with hex numbers:
    var n:Number;
    trace(parseInt("7FFFFFFF", 16));
    n = 2147483647;
  • To dump a byte array to disk: (must call from a user event for browser)
    import flash.system.*;
    import flash.utils.*;
    var code:ByteArray = new ByteArray();
    code.endian = Endian.BIG_ENDIAN;
    var fR:FileReference=new FileReference();,"xxx.bin");
  • To log text to the main display at runtime: (no debug player needed, see helper class for scrolling support)
    package  {
        import flash.display.*;
        import flash.system.*;
        import flash.text.*;
        public class Main extends MovieClip {
    	private var myTextBox:TextField = new TextField(); 
    	function xx(x){
    		myTextBox.text += x + "\n";
    	public function Main() {
    		myTextBox.autoSize = TextFieldAutoSize.LEFT;
                    var format:TextFormat = new TextFormat();
                    format.font = "Verdana";
                    format.size = 15;
                    myTextBox.defaultTextFormat = format;
    		xx("Starting flash version: " + Capabilities.version.toLowerCase() );

Comments: (3)

On 06.18.11 - 6:51pm Dave wrote:
this looks interesting too..flash remote debugging protocol info

On 06.20.11 - 7:47am Dave wrote:
I have to say, the amount of code it requires to create a simple button with text, or to create a textbox that scrolls is pretty nutty. Having to scatter your logic across async event handlers is a bit infuriating too.

On 06.29.11 - 1:38pm Dave wrote:
couple interesting links

Leave Comment:
Email: (not shown)
Message: (Required)
Math Question: 12 + 20 = ? followed by the letter: T 

About Me
More Blogs
Main Site
Posts: (All)
2021 ( 4 )
2020 ( 8 )
2019 ( 12 )
2017 ( 5 )
2016 ( 4 )
2015 ( 6 )
2014 ( 5 )
2013 ( 9 )
2012 ( 13 )
2011 (19)
     Graphing ideas
     .Net Hacking
     Old iDefense Releases
     hll shellcode
     ActionScript Tips
     -patch fu
     scdbg ordinal lookup
     scdbg -api mode
     Peb Module Lists
     scdbg vrs Process Injection
     GetProcAddress Scanner
     scdbg fopen mode
     scdbg findsc mode
     scdbg MemMonitor
     demo shellcodes
     scdbg download
     api hashs redux
     Api hash gen
2010 ( 11 )
2009 ( 1 )