How To Change E to L?

Hi,

I am new to Flash MX and I don’t know how to write script in flash or anything like that.
But I was wondering the [COLOR=red]‘E’[/COLOR] that can be found here =>http://www.kirupa.com/lab/ein3d.htm.
Does anyone know how I could go about changing that to a [COLOR=red]‘L’[/COLOR]?
If someone could do this or tell me how to do it, I will be very grateful.

Thanx,

Rock_star:whistle:

Have you downloaded the source? It should just be a matter of changing the vector locations of the letter

But as I am new to Flash MX. I don’t have a clue how to work out where the new vector locatons will be, could u tell me how to work it out please.

Well I can tell you that it’s in this part of the script.

Xcoords = new Array(-3,3,3,-1,-1,2,2,-1,-1,3,3,-3);
Ycoords = new Array(5,5,3,3,1,1,-1,-1,-3,-3,-5,-5);

I do not have the correct cordinates for an L shape, but I’ll give it a try (since I need a “D” for myself anyway.) But if you want… you can play around with these cordinates and see what you come up with . At the very least it should be interesting to change these numbers around, just to see what you get.

ok… easy solution so far… but I want to try to teach you to fish instead of just giving it to you (which I’ll do as well in a minute)

for now. Take this code and paste it exactly as is into the a/s window. First Frame of the main timeline, all the way at the bottem.

/*                         Xcoords   Ycoords
coords are set up like so    ( x   /   y )

  Xcoords[11]              Xcoords[10]
   (-3/-5)                   (3/-5)
	  @                        @
	      Xcoords[8]       Xcoords[9]
	       (-1/-3)           (3/-3)
	          @                @
		 Xcoords[7]    Xcoords[6]
	       (-1/-1)       (2/-1)
	          @            @
          Xcoords[4]   Xcoords[5]
           (-1/1)        (2/1)
              @            @
          Xcoords[3]       Xcoords[2]
            (-1/3)           (3/3)
	          @                @
  Xcoords[0]               Xcoords[1]
	(-3/5)                   (3/5)
	  @                        @

I use Xcoords array here but it doesn't matter. 
the Xcoord corespond to the Ycoords array
*/

ok… next thing you need to do is go to the second frame and look for this


for (t=0;t<12;t++)
	{
		x = Xcoords[t]*R0;
		y = Ycoords[t]*R0;
		z = 0;
		lx=x;
		ly=y*gcos-z*gsin;
		lz=y*gsin+z*gcos;
		tx=lx*fcos-lz*fsin;
		ty=ly;
		tz=((lx*fsin+lz*fcos)/Zweaken)+Zoffset;
		if(t!=0)
			lineTo((tx/tz)+Xoffset,(ty/tz)+Yoffset);
		else
			moveTo((tx/tz)+Xoffset,(ty/tz)+Yoffset);
	}

now where you see that… I want you to change a value.

the “for” statement above, should read

for (t=0;t<XCoords.length;t++)

so it should look like this


for (t=0;t<XCoords.length;t++)
	{
		x = Xcoords[t]*R0;
		y = Ycoords[t]*R0;
		z = 0;
		lx=x;
		ly=y*gcos-z*gsin;
		lz=y*gsin+z*gcos;
		tx=lx*fcos-lz*fsin;
		ty=ly;
		tz=((lx*fsin+lz*fcos)/Zweaken)+Zoffset;
		if(t!=0)
			lineTo((tx/tz)+Xoffset,(ty/tz)+Yoffset);
		else
			moveTo((tx/tz)+Xoffset,(ty/tz)+Yoffset);
	}

that will let you alter the number of points in the construct of lines. The first bit of code above shows how the coordinates of the x and y are set up. Using that you should be able to develope any other construct pretty easily.

This is the array code for an L shape

Xcoords = new Array(-3,3,3,-1,-1,-3);
Ycoords = new Array( 5,5,3, 3,-5,-5);

And attached I’ve included my altered FLA file.

Hi,

Thanks alot for your help david. I did exactly what you said and it worked which is cool.
I also now have a better understanding of the xcords array which I didn’t have a clue about before.
You have really helped and I will mess around with it a bit more and see what other letters I can make.
Well thanks alot for your help, it was greatly appreciated.

From

Rock_star