2d array text effect

[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. :frowning: If you want it, pm me your email, and I’ll email it to you.

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

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.

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 mask.[/COLOR][/FONT][/SIZE]

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

Amazing
simple and awesome

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

will do

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.


_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

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.

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

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

very impressive guys :smiley: me likey…

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

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…

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!

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

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