# 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:** 3

<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:** [March 27, 2006, 11:02pm UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/41 "2006-03-27T23:02:14Z")

</div>

[SIZE=4][FONT=Comic Sans MS][COLOR=#680aac]I get the need for an array creator, because it makes it waaay easier and faster. The only problem is, it doesn’t support more than one kind of tile, and it can’t be as many as you want. You would have to make a button for every tile you ever used, in order to change the color dynamically. I can’t figure out how to make it more flexible.

Meanwhile, irregular tiles!! I made the Tile class able to interact with rectangular tiles, but they all have to be the same shape.

Tile(array, array, number, number, movieclip, boolean);

Usage:  
tiles = [“block”, “block2”, “block3”];  
var Scene:Tile = new Tile(tile\_arr, tiles, 10, 15, \_root, true);  
Scene.distance();

My .fla got too big. ☹ If you want it, pm me your email, and I’ll email it to you.

Comments?[/COLOR]  
[/FONT][/SIZE]

---

<div class="post-metadata">

**Author:** ![stereochris](https://avatars.discourse-cdn.com/v4/letter/s/f4b2a3/32.png) [@stereochris](https://forum.kirupa.com/u/stereochris)\
**Post date:** [March 28, 2006, 2:32am UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/42 "2006-03-28T02:32:49Z")

</div>

Hey - I figured out how to create the tiles inside an empty movie clip, with the code on the movie clip, and the array on the root. So you can toss it in other movies or something like that. I just rotated it, for effect. Yep - check it out.

---

<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:** [March 29, 2006, 12:31am UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/43 "2006-03-29T00:31:15Z")

</div>

Zelwyn, check out my source above, it uses the setRGB color moddifier to change the color of one block, any hex value is accepted.

---

<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:** [March 29, 2006, 12:54am UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/44 "2006-03-29T00:54:02Z")

</div>

> [@cr125rider](#):
>
> Zelwyn, check out my source above, it uses the setRGB color moddifier to change the color of one block, any hex value is accepted.

[SIZE=4][FONT=Comic Sans MS][COLOR=#680aac]I would like to see your source, in order to see the context of that code. In the meantime, fun!! Yay for google! The other one, for those of you that don’t know is a [LEGO Bionicle](http://www.bionicle.com/) mask.[/COLOR][/FONT][/SIZE]

---

<div class="post-metadata">

**Author:** ![evildrummer](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/evildrummer/32/2308_2.png) [@evildrummer](https://forum.kirupa.com/u/evildrummer)\
**Post date:** [March 29, 2006, 11:37am UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/45 "2006-03-29T11:37:41Z")

</div>

Those are all amazing! I wish I new how to do all that stuff!

---

<div class="post-metadata">

**Author:** ![e\_sarbak](https://avatars.discourse-cdn.com/v4/letter/e/eb9ed0/32.png) [@e\_sarbak](https://forum.kirupa.com/u/e_sarbak)\
**Post date:** [March 29, 2006, 6:36pm UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/46 "2006-03-29T18:36:00Z")

</div>

Amazing  
simple and awesome

---

<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:** [March 31, 2006, 4:45am UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/47 "2006-03-31T04:45:59Z")

</div>

@Zelwyn, I posted it dude. Its attached as createArray3.fla in my post above. 😃  
@Nugget - can you combine all the ideas again…please :love:

---

<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:** [March 31, 2006, 6:27pm UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/48 "2006-03-31T18:27:52Z")

</div>

will do

---

<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:** [March 31, 2006, 11:21pm UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/49 "2006-03-31T23:21:28Z")

</div>

SteroeChris: You were already to put all of the blocks in an empty mc, just change the arg from \_root to YOUR\_MC

allright here it is, the most recent version of the Class Tile and the fla that explains how to use it and a swf to show my outcome. if anyone wants to make more effects that would be great or any more additions.

Edit: I made a mario map with my class, it isn’t the whole level, just the end of the 1st level, im sorry i can’t post the source, too big, but here is the script, you can get the idea, all of the pieces are 16x16 tiles from mario. I also added a scroll effect to go through the level.

```auto

_quality = "LOW";
Stage.scaleMode = "noScale";
Stage.align = "BL";
blocks = ['b1','b2','b3','b4','b5','b6','b7','b8','b9','b10',
    'b11','b12','b13','b14','b15','b16','b17','b18','b19','b20',
    'b21','b22','b23','b24','b25','b26','b27'];
tile = [
  [27,27,27,27,27,27,27,27,27,27,27,27,27,27],
  [27,27,27,27,27,27,27,27,27,27,27,27,27,27],
  [27,27,27,27,27,27,27, 8, 9,10,27,27,22,27],
  [27, 8, 9, 9,10,27,27, 5, 6, 7,27,11,12,27],
  [27, 5, 6, 6, 7,27,27,27,27,27,27,27,23,27],
  [27,27,27,27,27,27,27,27,27,27,27,27,23,27],
  [27,27,27,27,27,27,27,27,27,27,27,27,23,27],
  [27,27,27,26,24,26,27,27,27,27,27,27,23,27],
  [27,27,27,27,27,27,27,27,27,27, 1,27,23,27],
  [27,27,27,27,27,27,27,27,27, 1, 1,27,23,27],
  [27,20,21,27,27,27,27,27, 1, 1, 1,27,23,27],
  [27,18,19, 2, 3, 3, 4, 1, 1, 1, 1,27, 1,27],
  [13,13,13,13,13,13,13,13,13,13,13,13,13,13]
  ];
var Mario:Tile = new Tile(tile,blocks,16,16,_root,false,0);
Mario.beginScroll();

```

[FONT=Courier New][LEFT]  
[/LEFT]

[/FONT]

where b1-b26 are the tiles

---

<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 1, 2006, 2:26am UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/50 "2006-04-01T02:26:21Z")

</div>

> [@cr125rider](#):
>
> I added color functionallity to it, but it was to an old version. rmo518, it would be really cool if you could add it to a new version of it. I like the changes

Sorry for the delay in getting to this. Here is the new array generator with color capability and press and drag drawing/erasing.

You can set the color three ways: with the RGB sliders, by setting the RGB values from 0 to 255, or by setting the hex code directly (making sure it has the format 0xRRGGBB). I placed the color slider bars and related code on it’s own layer in the FLA.

I also set it to generate both the tile and color arrays at the same time.

---

<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 1, 2006, 4:28am UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/51 "2006-04-01T04:28:35Z")

</div>

i was wandering if someone could help me with speeding up scrolling. I made half of the mario level with the scrolling left and right but it is getting really slow. I want to know if there is a way to speed it up like the bitmap class or something, but i don’t know how to do that and don’t understand the stuff i have read. thanks here is my fla using the tile class

---

<div class="post-metadata">

**Author:** ![thats\_all\_folks](https://avatars.discourse-cdn.com/v4/letter/t/e0b2c6/32.png) [@thats\_all\_folks](https://forum.kirupa.com/u/thats_all_folks)\
**Post date:** [April 1, 2006, 8:26pm UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/52 "2006-04-01T20:26:57Z")

</div>

Is there a way to change the tile maps to say something esle besides “trp” I’ve picking apart the first example to to understand how this works.

Cheers

---

<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 1, 2006, 9:34pm UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/53 "2006-04-01T21:34:16Z")

</div>

> [@thats all folks](#):
>
> Is there a way to change the tile maps to say something esle besides “trp” I’ve picking apart the first example to to understand how this works.
> 
> Cheers

to do it you change the array around every new array in the master array begins a new row in a table. Every 1 is a cell in a table to fill look at the whole tread and maybe you will understand

---

<div class="post-metadata">

**Author:** ![simplistik](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/simplistik/32/7747_2.png) [@simplistik](https://forum.kirupa.com/u/simplistik)\
**Post date:** [April 1, 2006, 9:58pm UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/54 "2006-04-01T21:58:53Z")

</div>

very impressive guys 😃 me likey…

---

<div class="post-metadata">

**Author:** ![booler](https://avatars.discourse-cdn.com/v4/letter/b/e5b9ba/32.png) [@booler](https://forum.kirupa.com/u/booler)\
**Post date:** [April 1, 2006, 11:44pm UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/55 "2006-04-01T23:44:26Z")

</div>

Wow very nice guys kinda starts to lag on larger images but still very nice

---

<div class="post-metadata">

**Author:** ![booler](https://avatars.discourse-cdn.com/v4/letter/b/e5b9ba/32.png) [@booler](https://forum.kirupa.com/u/booler)\
**Post date:** [April 2, 2006, 12:52am UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/56 "2006-04-02T00:52:43Z")

</div>

> [@Lindquist](#):
>
> Sweet idea, here’s some bitmap action added into the mix. (In hindsight, I probably should’ve inherited your Tile class instead of changing it).
> 
> All you have to do in the .fla is change this line:
> 
> ActionScript Code:  
> [FONT=Courier New][LEFT]\</p\>  
> \<p\>var Scene:Tile = [COLOR=#000000] **new** [/COLOR] Tile[COLOR=#000000]([/COLOR]text\_arr,[COLOR=#ff0000]“block”[/COLOR],[COLOR=#000080]10[/COLOR] ,[COLOR=#0000ff]\_root[/COLOR],[COLOR=#000000] **true** [/COLOR][COLOR=#000000])[/COLOR];\</p\>  
> \<p\>  
> [/LEFT]  
> [/FONT]
> 
> to this line:
> 
> ActionScript Code:  
> [FONT=Courier New][LEFT]\</p\>  
> \<p\>var Scene:BitmapTile = [COLOR=#000000] **new** [/COLOR] BitmapTile[COLOR=#000000]([/COLOR]text\_arr,[COLOR=#ff0000]“block”[/COLOR],[COLOR=#000080]10[/COLOR] ,[COLOR=#0000ff]\_root[/COLOR],[COLOR=#000000] **true** [/COLOR], [COLOR=#ff0000]“pic”[/COLOR][COLOR=#000000])[/COLOR];\</p\>  
> \<p\>  
> [/LEFT]  
> [/FONT]
> 
> Where “pic” references a picture in the library.

Lind can you post the fla??? I can’t get this to work trying every combo I can think of I’m sure I’m missing something easy but I cant find it…

---

<div class="post-metadata">

**Author:** ![Lindquist](https://avatars.discourse-cdn.com/v4/letter/l/ccd318/32.png) [@Lindquist](https://forum.kirupa.com/u/Lindquist)\
**Post date:** [April 2, 2006, 3:52am UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/57 "2006-04-02T03:52:07Z")

</div>

Here you go. I changed the code in the .fla to make it a little more readable.

---

<div class="post-metadata">

**Author:** ![booler](https://avatars.discourse-cdn.com/v4/letter/b/e5b9ba/32.png) [@booler](https://forum.kirupa.com/u/booler)\
**Post date:** [April 2, 2006, 4:29pm UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/58 "2006-04-02T16:29:34Z")

</div>

> [@Lindquist](#):
>
> Here you go. I changed the code in the .fla to make it a little more readable.

Thanks lind I got it figured out I was not assigning the linkage ID to the jpg I was creating a MC and assigning it there Thanks!

---

<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 2, 2006, 5:21pm UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/59 "2006-04-02T17:21:23Z")

</div>

rmo518 - Thanks dude, it works great, nice sliders too!

---

<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, 6:56pm UTC](https://forum.kirupa.com/t/2d-array-text-effect/182748/60 "2006-04-02T18:56:04Z")

</div>

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)

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

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