Burning Ring of Fire
Creating the flame that the hand holds. Just some basic attempts to get it looking the way I want.
I wanted to get the flame to touch the logo on the screen and set fire to the logo text but after hours and hours of trying and failing I decided to just encase the code that causes the burning in quotes and leave it be. As can be seen below.
As far as I can tell the code that does cause the burning 'should' work, but instead of catching fire to the text it just seems to warp the original fire and cause excessive amounts of lag due to (I'm assuming) a bad loop somewhere down the line.
onEnterFrame = function () {
if(firstRun == "go"){
fadeInText_mc._alpha += 4;
hand_mc._y += 4;
arrow_mc._alpha -= 6;
}
var flame_mc = attachMovie("flame_mc", "flame_mc", i, decalpos);
i++;
var spark_mc = attachMovie("spark_mc", "spark_mc", i, decalpos);
i++;
flame_mc.speed = (Math.random()*(5-2)+2);
flame_mc.scaleDown = (Math.random()*(6-4)+4);
flame_mc.startScale = (Math.random()*(500-400)+400);
flame_mc._x = _root.xmousepos+(Math.random()*(3))-(Math.random()*(3));
flame_mc._rotation = random(360);
flame_mc._xscale = this.startScale;
flame_mc._yscale = this.startScale;
flame_mc._alpha = this.startScale;
spark_mc._alpha = (Math.random()*(90-20)+20);
spark_mc._x = _root.xmousepos+(Math.random()*(10))-(Math.random()*(10));
spark_mc._y = _root.ymousepos - 9;
spark_mc.speed = (Math.random()*(5-2)+2);
spark_mc._rotation = random(360);
spark_mc.scaleDown = (Math.random()*(3-2)+2);
spark_mc.onEnterFrame = function() {
this._alpha -= this.scaleDown;
this._y -= this.speed;
this._xscale -= this.scaleDown;
this._yscale -= this.scaleDown;
if (this._xscale<=1) {
this.removeMovieClip();
}
}
flame_mc.onEnterFrame = function() {
this._alpha -= flame_mc.scaleDown;
this._y -= this.speed;
this._xscale -= this.scaleDown;
this._yscale -= this.scaleDown;
/*if (this.hitTest(_root.marvelLogo_mc).hitTest(_x, _y, true)) {
this.removeMovieClip();
thisPosX = this._x;
thisPosY = this._y;
trace("hit "+p);
p++;
burnpos = {_x:thisPosX, _y:thisPosY};
var burn_mc = attachMovie("flame_mc", "flame_mc", i, burnpos);
i++;
burn_mc.speed = (Math.random()*(3-1)+1);
burn_mc.scaleDown = (Math.random()*(7-5)+5);
burn_mc.startScale = (Math.random()*(50-20)+20);
burn_mc._alpha = startScale;
burn_mc._xscale = startScale;
burn_mc._yscale = startScale;
burn_mc.onEnterFrame = function() {
this._y -= this.speed;
this._xscale -= this.scaleDown;
this._yscale -= this.scaleDown;
this._alpha -= this.scaleDown;
};
}*/
if (this._xscale<=1) {
this.removeMovieClip();
}
};
};
No comments:
Post a Comment