Chapter 13 Example 3

by actionscriptbible
♥0 | Line 14 | Modified 2009-11-11 06:47:24 | MIT License
play

ActionScript3 source code

/**
 * Copyright actionscriptbible ( http://wonderfl.net/user/actionscriptbible )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/zD89
 */

package {
  import com.actionscriptbible.Example;
  public class ch13ex3 extends Example {
    public function ch13ex3() {
      var rgb:uint = 0xd41153;
      var g:uint = rgb & 0x00ff00; //remember, f is 15 is 1111.
      g >>= 8; //we still have to move the bits down
      trace16(g); //0x11
    }
    public function trace16(n:uint):void {
      trace("0x" + n.toString(16));
    }
  }
}