# 2d array text effect

**URL:** <https://forum.kirupa.com/t/2d-array-text-effect/182748>\
**Category:** open source\
**Created:** [March 21, 2006, 5:12am UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748 "2006-03-21T05:12:23Z")\
**Posts on this page:** 20\
**Page:** 4

<div class="post-metadata">

**Author:** ![nugget](https://avatars.discourse-cdn.com/v4/letter/n/ebca7d/32.png) [@nugget](https://forum.kirupa.com/u/nugget)\
**Post date:** [April 2, 2006, 7:14pm UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/61 "2006-04-02T19:14:05Z")

</div>

> [@Shoo](#):
>
> theres a tutorial on this site called distance calculating, is it possible to create the same affect by tweaking that a bit?
> 
> Distance Claculating Tutorial: [http://www.kirupa.com/developer/actionscript/calculating\_distance.htm](http://www.kirupa.com/developer/actionscript/calculating_distance.htm)

this.\_alpha = 100-dist;  
should do the trick

---

<div class="post-metadata">

**Author:** ![Shoo](https://avatars.discourse-cdn.com/v4/letter/s/c4cdca/32.png) [@Shoo](https://forum.kirupa.com/u/Shoo)\
**Post date:** [April 2, 2006, 7:18pm UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/62 "2006-04-02T19:18:29Z")

</div>

> [@nugget](#):
>
> this.\_alpha = 100-dist;  
> should do the trick

nah I mean at the beginning of this thread he said that an array was the only way he could find to do it, so if you wanted to change the text you’d have to change the whole array. But if you could create the same effect using the distance calculation method you would’nt have to change the array to modify the text, You could just place the clips on the screen in the arrangement you wanted :glasses:

---

<div class="post-metadata">

**Author:** ![matthewjumps](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@matthewjumps](https://forum.kirupa.com/u/matthewjumps)\
**Post date:** [April 4, 2006, 12:29am UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/63 "2006-04-04T00:29:48Z")

</div>

:stare: this is brilliant!

---

<div class="post-metadata">

**Author:** ![Solidus](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@Solidus](https://forum.kirupa.com/u/Solidus)\
**Post date:** [April 4, 2006, 10:13pm UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/64 "2006-04-04T22:13:24Z")

</div>

wow really impressive guys nice job.

---

<div class="post-metadata">

**Author:** ![mot](https://avatars.discourse-cdn.com/v4/letter/m/c0e974/32.png) [@mot](https://forum.kirupa.com/u/mot)\
**Post date:** [April 5, 2006, 1:11pm UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/65 "2006-04-05T13:11:01Z")

</div>

im speechless 😑

---

<div class="post-metadata">

**Author:** ![kiwee](https://avatars.discourse-cdn.com/v4/letter/k/ec9cab/32.png) [@kiwee](https://forum.kirupa.com/u/kiwee)\
**Post date:** [April 7, 2006, 6:35pm UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/66 "2006-04-07T18:35:39Z")

</div>

could someone make one for this array please:

```auto

text_arr = [
[1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 1, 1, 1, 1, 1, 1, 1, 1]
];

color_arr = [
[0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0x23CEFF, 0x23CEFF, 0x23CEFF, 0xACFFFF],
[0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0x23CEFF, 0x23CEFF, 0x23CEFF, 0xACFFFF, 0xACFFFF],
[0xACFFFF, 0xACFFFF, 0xACFFFF, 0x23CEFF, 0x23CEFF, 0x23CEFF, 0xACFFFF, 0xACFFFF, 0xACFFFF],
[0xACFFFF, 0xACFFFF, 0x23CEFF, 0x23CEFF, 0x23CEFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF],
[0xACFFFF, 0x23CEFF, 0x23CEFF, 0x23CEFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF],
[0xACFFFF, 0x23CEFF, 0x23CEFF, 0x23CEFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF],
[0xACFFFF, 0xACFFFF, 0x23CEFF, 0x23CEFF, 0x23CEFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF],
[0xACFFFF, 0xACFFFF, 0xACFFFF, 0x23CEFF, 0x23CEFF, 0x23CEFF, 0xACFFFF, 0xACFFFF, 0xACFFFF],
[0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0x23CEFF, 0x23CEFF, 0x23CEFF, 0xACFFFF, 0xACFFFF],
[0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0x23CEFF, 0x23CEFF, 0x23CEFF, 0xACFFFF]
];

```

I really like this effect, but I don’t have flash, so i can’t compile it.

thanks

-kiwee

---

<div class="post-metadata">

**Author:** ![cr125rider](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/cr125rider/32/534_2.png) [@cr125rider](https://forum.kirupa.com/u/cr125rider)\
**Post date:** [April 7, 2006, 9:57pm UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/67 "2006-04-07T21:57:35Z")

</div>

Kiwee! I put it in my little viewer as preset 4, looks cool, nice job!

---

<div class="post-metadata">

**Author:** ![kiwee](https://avatars.discourse-cdn.com/v4/letter/k/ec9cab/32.png) [@kiwee](https://forum.kirupa.com/u/kiwee)\
**Post date:** [April 8, 2006, 9:36am UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/68 "2006-04-08T09:36:37Z")

</div>

thanks cr125rider 🙂  
could you make it into a separate flash file for my site? becuase I really like that!  
thanks a lot, again 😃

- kiwee

---

<div class="post-metadata">

**Author:** ![sed\_thh](https://avatars.discourse-cdn.com/v4/letter/s/c77e96/32.png) [@sed\_thh](https://forum.kirupa.com/u/sed_thh)\
**Post date:** [April 8, 2006, 2:15pm UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/69 "2006-04-08T14:15:31Z")

</div>

great job guys!

---

<div class="post-metadata">

**Author:** ![swamyg1](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@swamyg1](https://forum.kirupa.com/u/swamyg1)\
**Post date:** [April 10, 2006, 3:05am UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/70 "2006-04-10T03:05:44Z")

</div>

This is a totally stupid questions but how do you change the text in here?

I’m a total newb and feel dumb now…

---

<div class="post-metadata">

**Author:** ![nugget](https://avatars.discourse-cdn.com/v4/letter/n/ebca7d/32.png) [@nugget](https://forum.kirupa.com/u/nugget)\
**Post date:** [April 10, 2006, 11:49am UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/71 "2006-04-10T11:49:35Z")

</div>

> [@swamyg1](#):
>
> This is a totally stupid questions but how do you change the text in here?
> 
> I’m a total newb and feel dumb now…

change the array which is the big thing with all of the 1’s and 0’s.

everywhere there is a 1 in the array, a block will be put there.

edit: sorry, i forgot to explain the actual array and how the whole thing works:

the array is the big list of numbers, for our purposes 1’s and 0’s  
to make a sort of checkboard with the array you could do this:  
text\_arr=[  
[1,0,1,0,1],  
[0,1,0,1,0],  
[1,0,1,0,1],  
[0,1,0,1,0],  
[1,0,1,0,1]  
];  
where ever there is a one there will be a square, a new number after commas will result in a new column, a new row of numbers will result in a new row.

if you don’t understand the class, all it does is takes your array and places movieclips based on array position.

---

<div class="post-metadata">

**Author:** ![theflash](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/theflash/32/1221_2.png) [@theflash](https://forum.kirupa.com/u/theflash)\
**Post date:** [April 12, 2006, 6:00am UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/72 "2006-04-12T06:00:36Z")

</div>

This is pretty interesting… and code is pretty neat…

very nice job…

---

<div class="post-metadata">

**Author:** ![Zelwyn](https://avatars.discourse-cdn.com/v4/letter/z/3e96dc/32.png) [@Zelwyn](https://forum.kirupa.com/u/Zelwyn)\
**Post date:** [April 13, 2006, 9:07pm UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/73 "2006-04-13T21:07:48Z")

</div>

> [@kiwee](#):
>
> could someone make one for this array please:
> 
> ```auto
> 
> text_arr = [
> [1, 1, 1, 1, 1, 1, 1, 1, 1],
> [1, 1, 1, 1, 1, 1, 1, 1, 1],
> [1, 1, 1, 1, 1, 1, 1, 1, 1],
> [1, 1, 1, 1, 1, 1, 1, 1, 1],
> [1, 1, 1, 1, 1, 1, 1, 1, 1],
> [1, 1, 1, 1, 1, 1, 1, 1, 1],
> [1, 1, 1, 1, 1, 1, 1, 1, 1],
> [1, 1, 1, 1, 1, 1, 1, 1, 1],
> [1, 1, 1, 1, 1, 1, 1, 1, 1],
> [1, 1, 1, 1, 1, 1, 1, 1, 1]
> ];
> 
> color_arr = [
> [0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0x23CEFF, 0x23CEFF, 0x23CEFF, 0xACFFFF],
> [0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0x23CEFF, 0x23CEFF, 0x23CEFF, 0xACFFFF, 0xACFFFF],
> [0xACFFFF, 0xACFFFF, 0xACFFFF, 0x23CEFF, 0x23CEFF, 0x23CEFF, 0xACFFFF, 0xACFFFF, 0xACFFFF],
> [0xACFFFF, 0xACFFFF, 0x23CEFF, 0x23CEFF, 0x23CEFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF],
> [0xACFFFF, 0x23CEFF, 0x23CEFF, 0x23CEFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF],
> [0xACFFFF, 0x23CEFF, 0x23CEFF, 0x23CEFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF],
> [0xACFFFF, 0xACFFFF, 0x23CEFF, 0x23CEFF, 0x23CEFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF],
> [0xACFFFF, 0xACFFFF, 0xACFFFF, 0x23CEFF, 0x23CEFF, 0x23CEFF, 0xACFFFF, 0xACFFFF, 0xACFFFF],
> [0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0x23CEFF, 0x23CEFF, 0x23CEFF, 0xACFFFF, 0xACFFFF],
> [0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0x23CEFF, 0x23CEFF, 0x23CEFF, 0xACFFFF]
> ];
> 
> ```
> 
> I really like this effect, but I don’t have flash, so i can’t compile it.
> 
> thanks
> 
> -kiwee

The problem with this is that when you have more than one color, they have to be defined as movieclips, and then their linkage id makes of the colors array. I understand you can’t do that, but it would be pretty tedious work to ask someone else to do for you. I’m making it my duty now to set out and try to make it recognize an array of that form.

EDIT: I made it work. I however, can’t make your array work, kiwee. If you would go through and change the 1’s to a different number so they correspond with different colors, that would be greatly helpful.

Yay. All you have to do is use TileColor instead of Tile, and give an array in the following form for the array of colors. The Tile class I put out not long ago is still the same, and in my opinion, these two classes combined make the BitmapTile class obsolete, no offense. Soon, I’ll probably bundle them together into the all-encompassing Tile class. The source is the same Google logo I made a while ago, just with the TileColor class, and some funky dot I threw in.

array = [“tile”, 0xBACKGROUNDCOLOR, 0xCOLOR1, 0xCOLOR2, etc…];

It works.

P.S. If anyone feels like I’m taking over this topic, just let me know.

---

<div class="post-metadata">

**Author:** ![kiwee](https://avatars.discourse-cdn.com/v4/letter/k/ec9cab/32.png) [@kiwee](https://forum.kirupa.com/u/kiwee)\
**Post date:** [April 14, 2006, 3:35pm UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/74 "2006-04-14T15:35:53Z")

</div>

```auto

text_arr = [
[1, 1, 1, 1, 1, 2, 2, 2, 1],
[1, 1, 1, 1, 2, 2, 2, 1, 1],
[1, 1, 1, 2, 2, 2, 1, 1, 1],
[1, 1, 2, 2, 2, 1, 1, 1, 1],
[1, 2, 2, 2, 1, 1, 1, 1, 1],
[1, 2, 2, 2, 1, 1, 1, 1, 1],
[1, 1, 2, 2, 2, 1, 1, 1, 1],
[1, 1, 1, 2, 2, 2, 1, 1, 1],
[1, 1, 1, 1, 2, 2, 2, 1, 1],
[1, 1, 1, 1, 1, 2, 2, 2, 1]
];

color_arr = [
[0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0x23CEFF, 0x23CEFF, 0x23CEFF, 0xACFFFF],
[0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0x23CEFF, 0x23CEFF, 0x23CEFF, 0xACFFFF, 0xACFFFF],
[0xACFFFF, 0xACFFFF, 0xACFFFF, 0x23CEFF, 0x23CEFF, 0x23CEFF, 0xACFFFF, 0xACFFFF, 0xACFFFF],
[0xACFFFF, 0xACFFFF, 0x23CEFF, 0x23CEFF, 0x23CEFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF],
[0xACFFFF, 0x23CEFF, 0x23CEFF, 0x23CEFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF],
[0xACFFFF, 0x23CEFF, 0x23CEFF, 0x23CEFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF],
[0xACFFFF, 0xACFFFF, 0x23CEFF, 0x23CEFF, 0x23CEFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF],
[0xACFFFF, 0xACFFFF, 0xACFFFF, 0x23CEFF, 0x23CEFF, 0x23CEFF, 0xACFFFF, 0xACFFFF, 0xACFFFF],
[0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0x23CEFF, 0x23CEFF, 0x23CEFF, 0xACFFFF, 0xACFFFF],
[0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0xACFFFF, 0x23CEFF, 0x23CEFF, 0x23CEFF, 0xACFFFF]
];

```

here is the edited code 😉

---

<div class="post-metadata">

**Author:** ![Strength](https://avatars.discourse-cdn.com/v4/letter/s/43a26b/32.png) [@Strength](https://forum.kirupa.com/u/Strength)\
**Post date:** [April 18, 2006, 12:58pm UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/75 "2006-04-18T12:58:32Z")

</div>

Awesome! 😃

---

<div class="post-metadata">

**Author:** ![pips](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/pips/32/941_2.png) [@pips](https://forum.kirupa.com/u/pips)\
**Post date:** [April 24, 2006, 5:12pm UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/76 "2006-04-24T17:12:21Z")

</div>

My attribution… reworked createArrayColor… createColoredArray =D

fla: [http://jususdesign.com/pips/createColoredArray.fla](http://jususdesign.com/pips/createColoredArray.fla)  
swf: [http://jususdesign.com/pips/createColoredArray.html](http://jususdesign.com/pips/createColoredArray.html)

---

<div class="post-metadata">

**Author:** ![rmo518](https://avatars.discourse-cdn.com/v4/letter/r/f19dbf/32.png) [@rmo518](https://forum.kirupa.com/u/rmo518)\
**Post date:** [April 24, 2006, 6:15pm UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/77 "2006-04-24T18:15:30Z")

</div>

Nice upgrade! I like the color picker and the cleaned up interface.

---

<div class="post-metadata">

**Author:** ![pips](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/pips/32/941_2.png) [@pips](https://forum.kirupa.com/u/pips)\
**Post date:** [April 24, 2006, 6:37pm UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/78 "2006-04-24T18:37:54Z")

</div>

thnx 😉 But 70 % of the code is yours =D I`ll continue upgrading it... I`ll try to add a realtime preview of different effects now 🙂

I love the idea of such a community project 😉

---

<div class="post-metadata">

**Author:** ![pips](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/pips/32/941_2.png) [@pips](https://forum.kirupa.com/u/pips)\
**Post date:** [April 24, 2006, 6:37pm UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/79 "2006-04-24T18:37:56Z")

</div>

thnx 😉 But 70 % of the code is yours =D I`ll continue upgrading it... I`ll try to add a realtime preview of different effects now 🙂

I love the idea of such a community project 😉

---

<div class="post-metadata">

**Author:** ![cr125rider](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/cr125rider/32/534_2.png) [@cr125rider](https://forum.kirupa.com/u/cr125rider)\
**Post date:** [April 25, 2006, 2:02am UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/80 "2006-04-25T02:02:45Z")

</div>

Kiwee - You taken care of? I can post it if you want, sorry I dont check often.

You dont have to make a new movieclip for every color, you can use the setRGB() function. A lot of folks have posted with that in their source code if you would like to take a look.

EDIT: Pips - That color picker is amazing! Could you make the box an input though so the person could still type it in? Amazing work!

[Previous page](https://forum.kirupa.com/t/2d-array-text-effect/182748.md?page=3)

[Next page](https://forum.kirupa.com/t/2d-array-text-effect/182748.md?page=5)
