# \[MX\] Ilyas's Matrix Code Effect in a MovieClip

**URL:** <https://forum.kirupa.com/t/mx-ilyass-matrix-code-effect-in-a-movieclip/26411>\
**Category:** flash\
**Created:** [July 22, 2003, 8:23pm UTC](https://forum.kirupa.com/t/mx-ilyass-matrix-code-effect-in-a-movieclip/26411 "2003-07-22T20:23:08Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Keith130](https://avatars.discourse-cdn.com/v4/letter/k/b38774/32.png) [@Keith130](https://forum.kirupa.com/u/Keith130)\
**Post date:** [July 22, 2003, 8:23pm UTC](https://forum.kirupa.com/t/mx-ilyass-matrix-code-effect-in-a-movieclip/26411/1 "2003-07-22T20:23:08Z")

</div>

I am trying to make a matrix code effect inside a movieclip called “Code”, I am using the code made by Ilyas but have so far been unsucsessful, I can get it to work in the main root of a seperate .swf but not in the root of my main movie or a movieclip inside the root. I dont know how to alter it top make it work for a movieclip? Any suggestions? If you dont know the code I am talking about see below :

[AS]

/\*\*\*Author: Ilyas USAL (pom)  
Title: The Matrix has you…  
Date: 06/06/2003  
Version: 2 – Japanese characters, and it fades from white to green  
\*\*\*/  
// To make it run smoother  
\_quality = “MEDIUM”;

// String containing all the characters available in the font  
letters\_str = “abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz” ;  
length\_num = letters\_str.length ;

// Create a new trail every 100 milliseconds  
setInterval(this,“createTrail”,10);

/\*\*\* Functions \*\*\*/  
// fade out and remove clip when \_alpha inferior to 10 - no parameters  
function fadeToBlack(){  
this.\_alpha -= 5;  
if (this.\_alpha \< 10){  
delete this.onEnterFrame;  
this.removeMovieClip();  
}  
};  
// color fade from white to the original color  
function whiteToGreen(){  
this.\_alpha -= 3;  
if (this.rb \< 2 && this.gb \< 2 && this.bb \< 2){  
this.rb = this.gb = this.bb = 0;  
delete this.onEnterFrame;  
}  
else {  
this.rb \*= .9;  
this.gb \*= .9;  
this.bb \*= .9;  
}  
var trans = {rb:this.rb , gb:this.gb , bb:this.bb};  
this.col.setTransform(trans);  
};  
// Create a new clip with a letter in it  
// x: \_x position ; y: \_y position ; size: size of the letter  
MovieClip.prototype.createLetter = function (x,y,size){  
// Create and position the new clip  
var mc = this.createEmptyMovieClip(“letter”+this.dep,this.dep++);  
mc.\_x = x;  
mc.\_y = y;  
// Create a new TextField in the clip  
mc.createTextField(“t”,0,0,0,size,size);  
// Choose a random letter  
var myChar = letters\_str.charAt(random(length\_num));  
mc.t.text = myChar;  
// Create the TextFormat, format the text and embed the font  
var tf = new TextFormat();  
tf.size = size;  
tf.font = “Font1”;  
tf.selectable = false;  
tf.color = “0x00ff00”;  
mc.t.setTextFormat(tf);  
mc.t.embedFonts = true;  
// Letter goes from white to green  
mc.rb = mc.gb = mc.bb = 255;  
mc.col = new Color (mc) ;  
mc.col.setTransform({rb:255 , gb:255 , bb:255});  
mc.onEnterFrame = whiteToGreen;  
};  
// Create a trail of letters  
function createTrail(){  
// Create new clip and position it randomly  
var clip = this.createEmptyMovieClip(“trail”+i,i++);  
clip.\_x = Math.round(random(Stage.width)/10)\*10;  
clip.\_y = clip.y = -10;  
// Choose a random size for the letters, and set the spacing  
var size = random(10)+15;  
clip.spacing = size ;  
// onEnterFrame, create a new letter that will wade out.  
// if we’re at the bottom of the screen, fade out the whole trail  
clip.onEnterFrame = function(){  
this.y += this.spacing;  
this.createLetter(0,this.y,size);  
if (this.y \> Stage.height) this.onEnterFrame = fadeToBlack;  
};  
};  
[/AS]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 22, 2003, 8:39pm UTC](https://forum.kirupa.com/t/mx-ilyass-matrix-code-effect-in-a-movieclip/26411/2 "2003-07-22T20:39:39Z")

</div>

Make sure you give a linkage identifier to the font in the library.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 22, 2003, 8:50pm UTC](https://forum.kirupa.com/t/mx-ilyass-matrix-code-effect-in-a-movieclip/26411/3 "2003-07-22T20:50:04Z")

</div>

Ooops I had an i dentifyer before Trace Bitmaping my logo into the .swf and crashing my PC ,well it works now, thanks!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 22, 2003, 8:56pm UTC](https://forum.kirupa.com/t/mx-ilyass-matrix-code-effect-in-a-movieclip/26411/4 "2003-07-22T20:56:33Z")

</div>

No problem 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 22, 2003, 8:57pm UTC](https://forum.kirupa.com/t/mx-ilyass-matrix-code-effect-in-a-movieclip/26411/5 "2003-07-22T20:57:08Z")

</div>

That effect is too processor intensive for regular use, so if you are using it in a layout or something, I definitely don’t recommend that.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 23, 2003, 8:28am UTC](https://forum.kirupa.com/t/mx-ilyass-matrix-code-effect-in-a-movieclip/26411/6 "2003-07-23T08:28:31Z")

</div>

I agree Im only using it for a few seconds until the words “The Matrix” mask in. I am also using a setInterval of 150 so there arent that many trails on the screen at once.

[Offtopic]

This is probabily an insane question but is there anyway to recreate the Matrix Reloaded code effect at the beggining in AS or would that take hundreds of tweens?

[/Offtopic]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 23, 2003, 4:28pm UTC](https://forum.kirupa.com/t/mx-ilyass-matrix-code-effect-in-a-movieclip/26411/7 "2003-07-23T16:28:24Z")

</div>

My advice: forget it!! 😛

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 23, 2003, 5:27pm UTC](https://forum.kirupa.com/t/mx-ilyass-matrix-code-effect-in-a-movieclip/26411/8 "2003-07-23T17:27:14Z")

</div>

> \*Originally posted by Keith130 \*  
> \*\*[Offtopic]

This is probabily an insane question but is there anyway to recreate the Matrix Reloaded code effect at the beggining in AS or would that take hundreds of tweens?

[/Offtopic] \*\*  
yeah…i’m sure it can be done :whistle:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2003, 10:54am UTC](https://forum.kirupa.com/t/mx-ilyass-matrix-code-effect-in-a-movieclip/26411/9 "2003-07-24T10:54:18Z")

</div>

:bad:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2003, 11:34am UTC](https://forum.kirupa.com/t/mx-ilyass-matrix-code-effect-in-a-movieclip/26411/10 "2003-07-24T11:34:07Z")

</div>

What wrong with you Ilyas?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2003, 2:00pm UTC](https://forum.kirupa.com/t/mx-ilyass-matrix-code-effect-in-a-movieclip/26411/11 "2003-07-24T14:00:48Z")

</div>

whats the new matrix reloaded code effect like? isn’t it similiar?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2003, 2:18pm UTC](https://forum.kirupa.com/t/mx-ilyass-matrix-code-effect-in-a-movieclip/26411/12 "2003-07-24T14:18:47Z")

</div>

Yeh its similar exsept is code made of code made of code…

It sort of zooms out from the smallest code to the one that is made of that code and so on.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2003, 2:29pm UTC](https://forum.kirupa.com/t/mx-ilyass-matrix-code-effect-in-a-movieclip/26411/13 "2003-07-24T14:29:57Z")

</div>

> \*Originally posted by Keith130 \*  
> \*\*What wrong with you Ilyas? \*\*  
> Nothing 😛

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2003, 5:58pm UTC](https://forum.kirupa.com/t/mx-ilyass-matrix-code-effect-in-a-movieclip/26411/14 "2003-07-24T17:58:30Z")

</div>

What was the grr face thing for then?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2003, 6:01pm UTC](https://forum.kirupa.com/t/mx-ilyass-matrix-code-effect-in-a-movieclip/26411/15 "2003-07-24T18:01:04Z")

</div>

I believe it was kind of an “i dare you” gesture.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2003, 9:54pm UTC](https://forum.kirupa.com/t/mx-ilyass-matrix-code-effect-in-a-movieclip/26411/16 "2003-07-24T21:54:30Z")

</div>

Yeh that will be the day when I create some advanced actionscript I just marvel the how people know all the stuff they do and lamly try to make something I am happy with, no I will leave some Matrix Coding to someone who knows what they are doing.
