Saturday 31st July 2021

Archive for the ‘ActionScript’ Category

Tips on Improve Your Adobe Air App Performance

By flashmagazine.com:   ”ten techniques used to improve performance, usability, and security of AIR applications, and to make the development process faster and easier:

  • Keeping memory usage low
  • Reducing CPU usage
  • Storing sensitive data
  • Writing a “headless” application
  • Updating the dock and system tray icons
  • Handling network connectivity changes
  • Creating “debug” and “test” modes
  • Detecting when the user is idle
  • Managing secondary windows
  • Programming for different operating systems……..”

Follow this link for the full article on ten useful tips to optimize your Adobe Air App performance:  Ten tips for building better Adobe AIR applications



Sample code: resusable MouseEvent class with mix of buttons and movieclips

(Flash ActionScript 3)  By Tony Pan

There were times that we’ll have to assign mouse event to number of buttons or movieclips on the stage, ie.  navigation elements.  It is perfectly fine to implement the addEventListener individually to each of these buttons and movieclips.   But what if there are a large number of these buttons, and needed to use on few different individual swf files.   Here is the example code for importing  the same class file and create an storage array for the buttons and movieclips.   Then called the class function passing the storage array.

Sample Screen: (Roll mouse cursor over and click on them)

Code on the FLA file (buttons.fla):

import com.buttonEvent;
var addButtonEvent:buttonEvent = new buttonEvent(this);
var buttonArray:Array = new Array();
buttonArray = [button1, button2, button3, button4, button5, button6];
addButtonEvent.iniButtons(buttonArray);

Code on the package file (buttonEvnet.as):

Continue Reading »