Section 1
//BitmapAsset (mx.core.BitmapAsset)
package mx.core {
import flash.display.*;
public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject {
mx_internal static const VERSION:String = "2.0.0.0";
public function BitmapAsset(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
public function get measuredWidth():Number{
if (bitmapData){
return (bitmapData.width);
};
return (0);
}
public function get measuredHeight():Number{
if (bitmapData){
return (bitmapData.height);
};
return (0);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
}
}//package mx.core
Section 2
//FlexBitmap (mx.core.FlexBitmap)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexBitmap extends Bitmap {
mx_internal static const VERSION:String = "2.0.0.0";
public function FlexBitmap(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){
var bitmapData = _arg1;
var pixelSnapping = _arg2;
var smoothing = _arg3;
super(bitmapData, pixelSnapping, smoothing);
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 3
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 4
//IFlexDisplayObject (mx.core.IFlexDisplayObject)
package mx.core {
import flash.events.*;
import flash.display.*;
public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher {
function get name():String;
function set width(_arg1:Number):void;
function get measuredHeight():Number;
function set height(_arg1:Number):void;
function get scaleY():Number;
function move(_arg1:Number, _arg2:Number):void;
function get scaleX():Number;
function set mask(_arg1:DisplayObject):void;
function set scaleX(_arg1:Number):void;
function set name(_arg1:String):void;
function set scaleY(_arg1:Number):void;
function get visible():Boolean;
function get measuredWidth():Number;
function set visible(_arg1:Boolean):void;
function get alpha():Number;
function get height():Number;
function get width():Number;
function get parent():DisplayObjectContainer;
function get mask():DisplayObject;
function set x(_arg1:Number):void;
function setActualSize(_arg1:Number, _arg2:Number):void;
function set y(_arg1:Number):void;
function get x():Number;
function get y():Number;
function set alpha(_arg1:Number):void;
}
}//package mx.core
Section 5
//IRepeaterClient (mx.core.IRepeaterClient)
package mx.core {
public interface IRepeaterClient {
function set instanceIndices(_arg1:Array):void;
function get isDocument():Boolean;
function get repeaters():Array;
function get instanceIndices():Array;
function set repeaters(_arg1:Array):void;
function initializeRepeaterArrays(_arg1:IRepeaterClient):void;
function set repeaterIndices(_arg1:Array):void;
function get repeaterIndices():Array;
}
}//package mx.core
Section 6
//mx_internal (mx.core.mx_internal)
package mx.core {
public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal";
}//package mx.core
Section 7
//NameUtil (mx.utils.NameUtil)
package mx.utils {
import flash.display.*;
import mx.core.*;
import flash.utils.*;
public class NameUtil {
mx_internal static const VERSION:String = "2.0.0.0";
private static var counter:int = 0;
public static function displayObjectToString(_arg1:DisplayObject):String{
var _local2:String;
var _local3:DisplayObject;
var _local4:String;
var _local5:Array;
_local3 = _arg1;
while (_local3 != null) {
if (((((_local3.parent) && (_local3.stage))) && ((_local3.parent == _local3.stage)))){
break;
};
_local4 = _local3.name;
if ((_local3 is IRepeaterClient)){
_local5 = IRepeaterClient(_local3).instanceIndices;
if (_local5){
_local4 = (_local4 + (("[" + _local5.join("][")) + "]"));
};
};
_local2 = ((_local2 == null)) ? _local4 : ((_local4 + ".") + _local2);
_local3 = _local3.parent;
};
return (_local2);
}
public static function createUniqueName(_arg1:Object):String{
var _local2:String;
var _local3:int;
var _local4:int;
if (!_arg1){
return (null);
};
_local2 = getQualifiedClassName(_arg1);
_local3 = _local2.indexOf("::");
if (_local3 != -1){
_local2 = _local2.substr((_local3 + 2));
};
_local4 = _local2.charCodeAt((_local2.length - 1));
if ((((_local4 >= 48)) && ((_local4 <= 57)))){
_local2 = (_local2 + "_");
};
return ((_local2 + counter++));
}
}
}//package mx.utils
Section 8
//Kiss (Kiss)
package {
import flash.events.*;
import flash.display.*;
public class Kiss extends Sprite {
public function Kiss():void{
var _local1:int;
var _local2:Sprite;
var _local3:int;
var _local4:int;
var _local5:int;
super();
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
KissParts.initParts();
_local3 = 0;
_local4 = 0;
_local5 = 0;
_local1 = 0;
while (_local1 < KissParts.numParts()) {
_local2 = new KissParts(_local1);
addChild(_local2);
if ((_local2.height + _local4) >= stage.stageHeight){
_local4 = 0;
_local3 = (_local3 + Math.floor((_local5 * 0.75)));
_local5 = 0;
};
_local2.x = _local3;
_local2.y = _local4;
if (_local1 == 0){
_local3 = _local2.width;
} else {
_local4 = (_local4 + Math.floor((_local2.height * 0.4)));
if (_local2.width > _local5){
_local5 = _local2.width;
};
};
_local1++;
};
addEventListener(MouseEvent.MOUSE_DOWN, onDown);
addEventListener(MouseEvent.MOUSE_UP, onUp);
}
private function onDown(_arg1:MouseEvent):void{
var _local2:KissParts;
var _local3:int;
_local3 = (numChildren - 1);
while (_local3 >= 0) {
_local2 = (getChildAt(_local3) as KissParts);
if (((_local2) && (_local2.isHit(mouseX, mouseY)))){
if (_local3 > 0){
if (_arg1.ctrlKey){
setChildIndex(_local2, 1);
} else {
if (!_arg1.shiftKey){
setChildIndex(_local2, (numChildren - 1));
};
};
};
_local2.startDrag();
break;
};
_local3--;
};
}
private function onUp(_arg1:Event):void{
stopDrag();
}
}
}//package
Section 9
//KissParts (KissParts)
package {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import mx.core.*;
import flash.media.*;
import flash.utils.*;
public class KissParts extends Sprite {
private var bitmap:Bitmap;
private var kCount:int;
private var kBitmap:Bitmap;
private var kMode:int;
private static var parts:Array;
private static var partsSrc:Class = KissParts_partsSrc;
private static var kiriko:BitmapData;
private static var maskSrc:Class = KissParts_maskSrc;
public function KissParts(_arg1:int):void{
if ((((_arg1 < 0)) || ((_arg1 >= parts.length)))){
return;
};
bitmap = new Bitmap(parts[_arg1]);
addChild(bitmap);
if (_arg1 == 0){
kBitmap = new Bitmap(kiriko);
addChild(kBitmap);
kBitmap.alpha = 0;
kMode = 0;
kCount = 0;
addEventListener(Event.ENTER_FRAME, onEnterFrame);
};
buttonMode = true;
}
public function isHit(_arg1:int, _arg2:int):Boolean{
_arg1 = (_arg1 - x);
_arg2 = (_arg2 - y);
return (!(((bitmap.bitmapData.getPixel32(_arg1, _arg2) & 4278190080) == 0)));
}
private function onEnterFrame(_arg1:Event):void{
var _local2:int;
switch (kMode){
case 0:
case 2:
_local2 = ((kMode)==0) ? 60 : 5;
kCount++;
if (kCount == (_local2 * stage.frameRate)){
kCount = 0;
kMode++;
};
break;
case 1:
case 3:
kCount++;
if (kMode == 1){
kBitmap.alpha = (kCount / stage.frameRate);
} else {
kBitmap.alpha = (1 - (kCount / stage.frameRate));
};
if (kCount == stage.frameRate){
kCount = 0;
kMode++;
};
break;
};
kMode = (kMode & 3);
}
public static function initParts():void{
var _local1:int;
var _local2:int;
var _local3:Rectangle;
var _local4:BitmapData;
var _local5:BitmapData;
var _local6:BitmapData;
_local5 = new partsSrc().bitmapData;
_local6 = new maskSrc().bitmapData;
parts = new Array();
kiriko = null;
_local1 = 1;
while (_local1 < _local6.width) {
_local2 = 0;
while (_local2 < _local6.height) {
if (((!(_local6.getPixel(_local1, _local2))) || (_local6.getPixel((_local1 - 1), _local2)))){
_local2++;
} else {
_local3 = getMaskRect(_local6, _local1, _local2);
_local4 = new BitmapData(_local3.width, _local3.height);
_local4.copyPixels(_local5, _local3, new Point(0, 0));
if (!kiriko){
kiriko = _local4;
} else {
parts[parts.length] = _local4;
};
_local2 = (_local2 + _local3.height);
};
};
_local1++;
};
}
private static function getMaskRect(_arg1:BitmapData, _arg2:int, _arg3:int):Rectangle{
var _local4:int;
var _local5:int;
var _local6:Rectangle;
_local6 = new Rectangle(_arg2, _arg3);
_local4 = (_arg2 + 1);
while (_local4 < _arg1.width) {
if (!_arg1.getPixel(_local4, _arg3)){
break;
};
_local4++;
};
_local6.right = _local4;
_local4 = (_arg3 + 1);
while (_local4 < _arg1.height) {
if (!_arg1.getPixel(_arg2, _local4)){
break;
};
_local4++;
};
_local6.bottom = _local4;
return (_local6);
}
public static function numParts():int{
return (parts.length);
}
}
}//package
Section 10
//KissParts_maskSrc (KissParts_maskSrc)
package {
import mx.core.*;
public class KissParts_maskSrc extends BitmapAsset {
}
}//package
Section 11
//KissParts_partsSrc (KissParts_partsSrc)
package {
import mx.core.*;
public class KissParts_partsSrc extends BitmapAsset {
}
}//package