Frame 1
function bitmapsInit() {
trace("*");
picWidth = picBmp.width;
picHeight = picBmp.height;
maskBmp = new flash.display.BitmapData(picWidth, picHeight);
viewBmp = new flash.display.BitmapData(picWidth, picHeight, true, 4278190000);
darkBmp = new flash.display.BitmapData(picWidth, picHeight, true, 4278190080);
var _local2 = new flash.geom.Matrix();
var _local1 = new flash.geom.ColorTransform();
_local1.alphaMultiplier = 0.2;
darkBmp.draw(picBmp, _local2, _local1, "normal", picBmp.rectangle);
maskMc._visible = false;
boxfill2(maskMc, picWidth, picHeight, 0);
picGetMc._visible = false;
sound01bgn();
}
function keyDownProc() {
inkey = Key.getCode();
if (Key.isDown(38)) {
viewMcScaleChange(1.5);
}
if (Key.isDown(40)) {
viewMcScaleChange(0.6666667);
}
if ((inkey == 13) | (inkey == 34)) {
firetime = 0;
life = 1;
sound01bgn();
_root.viewMc.match.match2.gotoAndPlay(1);
}
}
function viewMcScaleChange(mag) {
if (((viewMc._width * mag) < 2500) && ((viewMc._height * mag) < 2500)) {
var _local2 = new Object();
var _local4 = new Object();
var _local3 = new Object();
_local2.x = _root._xmouse;
_local2.y = _root._ymouse;
_local4.x = _local2.x;
_local4.y = _local2.y;
viewMc.globalToLocal(_local4);
viewMc._xscale = viewMc._xscale * mag;
viewMc._yscale = viewMc._yscale * mag;
_local3.x = _local4.x;
_local3.y = _local4.y;
viewMc.localToGlobal(_local3);
viewMc._x = viewMc._x - (_local3.x - _local2.x);
viewMc._y = viewMc._y - (_local3.y - _local2.y);
}
}
function boxfill(mc, xBgn, yBgn, xEnd, yEnd, col) {
mc.beginFill(col);
mc.moveTo(xBgn, yBgn);
mc.lineTo(xEnd, yBgn);
mc.lineTo(xEnd, yEnd);
mc.lineTo(xBgn, yEnd);
mc.lineTo(xBgn, yBgn);
mc.endFill();
}
function boxfill2(mc, xSize, ySize, col) {
boxfill(mc, 0, 0, xSize, ySize, col);
}
function sound01bgn() {
this._sound = new Sound();
this._sound.start(1.5, 10);
}
this.createEmptyMovieClip("picGetMc", this.getNextHighestDepth());
this.createEmptyMovieClip("maskMc", this.getNextHighestDepth());
this.createEmptyMovieClip("viewMc", this.getNextHighestDepth());
viewMc.createEmptyMovieClip("darkMc", this.getNextHighestDepth());
viewMc.darkMc.loadMovie(p2);
maskMc.attachMovie("hikari", "hikari", maskMc.getNextHighestDepth());
viewMc.attachMovie("rainbow", "rainbow", 120);
viewMc.rainbow._xscale = 20;
viewMc.rainbow._yscale = 20;
viewMc.rainbow.light._visible = false;
my_mcl = new MovieClipLoader();
my_mcl.loadClip(p1, picGetMc);
mclListener = new Object();
my_mcl.addListener(mclListener);
Mouse.hide();
mclListener.onLoadInit = function (target_mc) {
trace(GetMc._width);
trace(picGetMc._height);
picBmp = new flash.display.BitmapData(picGetMc._width, picGetMc._height, true, 4278190000);
var _local2 = new flash.geom.Matrix();
var _local1 = new flash.geom.ColorTransform();
picBmp.draw(picGetMc, _local2, _local1, "normal", picBmp.rectangle);
bitmapsInit();
};
viewMc.rainbow.onEnterFrame = function () {
var _local3 = new Object();
_local3.x = _root._xmouse;
_local3.y = _root._ymouse;
viewMc.globalToLocal(_local3);
this._x = _local3.x;
this._y = _local3.y;
};
maskMc.hikari.onEnterFrame = function () {
if (firetime == Nan) {
firetime = 0;
life = 1;
}
firetime++;
var _local3 = new Object();
_local3.x = viewMc.rainbow.light._x;
_local3.y = viewMc.rainbow.light._y;
viewMc.rainbow.localToGlobal(_local3);
viewMc.globalToLocal(_local3);
this._x = ((_local3.x - 20) + (Math.random() * 15)) - 7.5;
this._y = ((_local3.y - 20) + (Math.random() * 15)) - 7.5;
this._alpha = ((Math.random() * 50) + 50) * life;
aa++;
if ((firetime > 100) & (_root.viewMc.match.match2._currentframe < 5)) {
_root.viewMc.match.match2.gotoAndPlay(5);
}
if (_root.viewMc.match.match2._currentframe > 5) {
if (_root.viewMc.match.match2.flame._xscale == undefined) {
life = 0;
} else {
life = _root.viewMc.match.match2.flame._xscale / 100;
}
}
};
viewMc.onEnterFrame = function () {
var _local1 = new flash.geom.Matrix();
var _local2 = new flash.geom.ColorTransform();
maskBmp.draw(maskMc, _local1, _local2, "normal", maskBmp.rectangle);
viewBmp.fillRect(viewBmp.rectangle, 4278190000);
viewBmp.copyPixels(picBmp, picBmp.rectangle, new flash.geom.Point(0, 0));
viewBmp.copyChannel(maskBmp, maskBmp.rectangle, new flash.geom.Point(0, 0), 1, 8);
boxfill2(viewMc, picWidth, picHeight, 0);
viewMc.attachBitmap(viewBmp, 100);
picGetMc._visible = false;
};
viewMc.onMouseDown = function () {
if (Key.isDown(32)) {
this.startDrag();
}
};
viewMc.onMouseUp = function () {
this.stopDrag();
};
viewMc.onMouseMove = function () {
updateAfterEvent();
};
var keyListener1 = new Object();
keyListener1.target_mc = mc01;
keyListener1.onKeyDown = keyDownProc;
Key.addListener(keyListener1);
mouseListener = new Object();
mouseListener.onMouseWheel = function (delta, target) {
if (delta > 0) {
viewMcScaleChange(1.5);
} else {
viewMcScaleChange(0.6666667);
}
};
Mouse.addListener(mouseListener);
Symbol 30 MovieClip Frame 4
stop();
Symbol 30 MovieClip Frame 27
stop();