Posts Tagged ‘matrix’

Links: Definitions

May 17, 2010
  1. Hash tables (hush function), “to quickly locate a data record (for example, a dictionary definition) given its “search key
    Associative arrays, dynamic sets.
  2. Namespaces: tutorial from Grant Skinner
  3. Matrices in AS3: tutorial from Senocular
  4. Matrix: analog of  “MovieClip.localToGlobal(point)” on Matrix level:

import flash.geom.Matrix;
/**
 * "Global" matrix of nested MovieClip
 * @author Sergei Nikiforovski, 2010
 * note: as2 !
 */
public function getMc_nestedMatrix( mc:MovieClip ):Matrix
 {
 var m0:Matrix = mc.transform.matrix;

 var mc2:MovieClip;
 var m:Matrix = new Matrix();

 for (var s in mc) {
 if ( typeof( mc[s] ) == "movieclip" ) {
 mc2 = mc[s];
 m = getMc_nestedMatrix( mc2 );
 break;
 }
 }

 m.concat( m0 );
 return m;
 }