Questions regarding the AS in making electricity

ok well i’ve jsut downloaded eilsoes electricity thing which is here:
http://www.kirupaforum.com/showthread.php?s=&threadid=9406
and i’m really confused of all the action scripting and stuff. I was planning on creating somethin similar except without the sliding bar, just the electricity; the domes don’t even have to move.

So which AS would be useful? i read through the AS he put in but i didnt’ understand what ‘Math.Floor’ was…
can someone explain that?

I also saw the stuff ‘home1x’ ‘home1y’. What are the differences between these and ‘point1x’ and ‘point1y’? and what exactly are they…???

I think i can sorta make out the rest but i’m not quite sure thats it for now thx for your help

Math.floor - rounds a number down if it is a decimal.

home1x
home1y

X and Y position of the home1 point.

Same goes with all the other things that say x and y. This is comprised by a bunch of points with lines connected to them.

These points move randomly around.

so which is the home1 point? is it the dome?
another question just came up to me…
what does the ‘int’ mean?
and _X and _Y?

thx

locate what home1point is used for in the script and find the object that has that instance name.

int is the old method of Math.round() (obviously rounds a number).

_x and _y are one of the most basic things in actionscript. It is the X and Y coords… that is definitely something you need to know to understand this script (as well as the math things).

o whoops, you wouldn’t happen to know a site or tutoriuals which explain the basics would you?

The tutorials that come with Flash.

ah ok i’ve read through action script dictionary and it cleared up some stuff, but it doesn’t seem to tell me why in his AS, it reads:

Point1x…
Point1y…

and then it jumps to

point12X…
point12Y…

can you explain this plz thanks

Those are variables.

Look where those variables are used in the script.

They are used to determine the x and y point of where the line will be drawn too.

this is confusing i think i may get on with somethin simpler :beam:

Yeah, this is a bit advanced for what you know so far :-\

Good luck finding another tutorial.

Did you search Flashkit?

*Originally posted by blah-de-blah *
**this is confusing i think i may get on with somethin simpler :beam: **
Wise move, my friend. Wise move… :slight_smile:

nah i don’t like flashkit that much i find it real confusing because of the layout…it annoys me :*(