Tips

Make your site load FAST

Straight from Yahoo! Rules for High Performance Sites

  1. Make Fewer HTTP Requests
  2. Add an Expires Header
  3. Gzip Components
  4. Put CSS at the Top
  5. Move Scripts to the Bottom
  6. Avoid CSS Expressions
  7. Make JavaScript and CSS External
  8. Reduce DNS Lookups
  9. Minify JavaScript
  10. Avoid Redirects
  11. Remove Duplicate Scripts
  12. Configure ETags
  13. Use a Content Delivery Network

The last 2 you may not be able to do depending on your environment but you should be able to accomplish most of what is on this list.

If you are using Firefox download the Firebug and YSlow Extentions to test your implementation of these speed suggestions.

ActionScript

UPDATE: this doens't work so well with event handlers and methods. Just use it for properties. Maybe it will be fixed in AS3, crossing my fingers.

Problem:

You are changing lots of properties(more than 2) in your code with long movie clip instance names or many embeded within eachother.

mainMC.bodyMC.armMC.fingerMC._y = 10;
mainMC.bodyMC.armMC.fingerMC._x = 250;
mainMC.bodyMC.armMC.fingerMC._alpha =80;
mainMC.bodyMC.armMC.fingerMC.onRelease = function(){ trace('Ouch'); };
mainMC.bodyMC.armMC.fingerMC.onRollOver = function(){ trace('What are you doing?'); };

Solution:

Save some time and clean up your code with with(){}:

		with( mainMC.bodyMC.armMC.fingerMC ) {
   			_y = 10; 
          	_x = 250;
          	_alpha =80;
          	//onRelease = function() { trace('Ouch'); }; 
          	//onRollOver = function() { trace('What are you doing?'); };
          	var randomVarName:String = 'hi';
          	trace( _name );
		}
      

It is as if you were on the first fram of fingerMC but you can keep your code in a central location and much easier to edit later when you want the same stuff for legMC;)

 

JavaScript

Problem:

If you have ever had to use href="javascript: window.open();"

You will notice in some browsers(IE) will direct the parent window a page with an [object] displayed

Not what you probably want

Solution:

To fix this , pass the function into the void() function which make sure nothing is returned

eg. <a href="javascript: void( window.open('file.htm','name','features') );" >test</a>

Or stop a page from refreshing on a text link <a href="javascript: void( 0 );" onclick="show('divID')" >test</a>