Hello,
I am new to Flash and while I am learning alot by building my site, I am having some conflicting issues and could use some advice.
I followed a text base mouse trail tutorial and the random vibration tutorial (found here). The issue I am having is being able to use both at the same time. I can either have the text based mouse trail OR the random multiple vibrating circles, but not both. I think it has to do with the “MovieClip” name.
Any help is greatly appreciated! Thank you!
Here is the code for both items:
Mouse trail - Found in frame one
Text = “ATOMIC KAT STUDIOS”;
letters = Text.split("");
//Format1
fontformat = new TextFormat();
fontformat.font = “Verdana”;
fontformat.align = “center”;
fontformat.size = “10”;
fontformat.color = “0xFFFFFF”;
fontformat.bold=true;
//format2
fontformat1 = new TextFormat();
fontformat1.font = “Verdana”;
fontformat1.align = “center”;
fontformat1.size = “10”;
fontformat1.color = “0xFFFFFF”;
fontformat1.bold=true;
spacing = 6;
speed = 3;
for (var LTR = 0; LTR<letters.length; LTR++) {
mc = _root.createEmptyMovieClip(“l”+LTR, LTR);
mc.createTextField(“t”+letters[LTR], LTR, LTR*spacing, 10, 20, 20);
with (mc[“t”+letters[LTR]]) {
trace(LTR);
text = letters[LTR];
//for first 7 characters
if(LTR<7)
{
setTextFormat(fontformat);
}
//for after 7 characters
else
{
setTextFormat(fontformat1);
}
selectable = false;
}
if (LTR) {
mc.prevClip = _root["l"+(LTR-1)];
mc.onEnterFrame = function() {
this._x = this._x+(this.prevClip._x-this._x+5)/speed;
this._y = this._y+(this.prevClip._y-this._y)/speed;
};
} else {
mc.onEnterFrame = function() {
this._x = this._x+(_root._xmouse-this._x+10)/speed;
this._y = this._y+(_root._ymouse-this._y)/speed;
};
}
**Mouse trail - **
onClipEvent (load) {
//movie width/height
height = 720;
width = 1280;
//------------------------//
//makes everything random //
//------------------------//
this._x = Math.round(Math.random()*width);
this._y = Math.round(Math.random()*height);
var temp = this._alpha=Math.random()*100;
this._xscale = this._yscale=temp;
//setting initiaion position
cx = this._x;
cy = this._y;
}
onClipEvent (enterFrame) {
//causes the object to be offset
this._x = cx+(1+Math.random()*5);
this._y = cy+(1+Math.random()*5);
}
And then the additive code for duplication (vibration):
for (var i = 0; i<25; i++) {
circle.duplicateMovieClip(i, i);
}