PDA

Click to See Complete Forum and Search --> : A Line Effect (Dont know whats its called)



Woot
10-12-2002, 01:18 PM
Hi,

Its my first time on the forums, but Ive been checking the site for a while now :) I got a question and I dont know if it should go under this part of the forums but... Well I found this effect in the movies section, tried to download it to see how it worked and the actual .fla file was 0 bytes.

http://www.flashkit.com/movies/Scripting/Eyematio-Bert_Gra-7780/index.php

I was wondering if somebody could tell me how to make this effect and if it isnt much trouble how I would be able to place it in my movie. I was thinking of making of making it like 2 LLs, the second one would be upside down and turned around but I got not freaking clue on how to do it. Im not asking somebody to make something like this for me, just to point me in the right direction :) Thanks for the help.

Sincerely,
Woot

exorcyze
10-20-2002, 07:54 PM
Here's the code for one half of it - should be pretty easy to figure out by plotting out what it's doing manually on a peice of paper if you don't get it right away:


this.lineStyle(0, 0xEEEEEE, 100);
for (var i=0; i<= 400; i+=10) {
_root.moveTo(i, 0);
_root.lineTo(400, i);
}


If you would like it to animate like in the example, then you could use something like this:


var totalSize = 400;
var step = 20;
var counter = 0;

this.onEnterFrame = function() {
this.lineStyle(0, 0x8080FF, 100);
this.moveTo(counter, 0);
this.lineTo(totalSize, counter);
counter += step;
if (counter > totalSize) delete this.onEnterFrame;
}


Those both use the drawing API in flashMX, and are intended for a movie sized 400x400.

Hope that helps...