PDA

View Full Version : questions regarding the AS in making electricity



blah-de-blah
November 24th, 2002, 12:42 AM
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

lostinbeta
November 24th, 2002, 12:46 AM
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.

blah-de-blah
November 24th, 2002, 12:52 AM
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

lostinbeta
November 24th, 2002, 12:58 AM
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).

blah-de-blah
November 24th, 2002, 01:01 AM
o whoops, you wouldn't happen to know a site or tutoriuals which explain the basics would you?

lostinbeta
November 24th, 2002, 01:07 AM
The tutorials that come with Flash.

blah-de-blah
November 24th, 2002, 01:26 AM
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

lostinbeta
November 24th, 2002, 01:31 AM
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.

blah-de-blah
November 24th, 2002, 01:57 AM
this is confusing i think i may get on with somethin simpler :beam:

lostinbeta
November 24th, 2002, 02:01 AM
Yeah, this is a bit advanced for what you know so far :-\

Good luck finding another tutorial.

Did you search Flashkit?

pom
November 25th, 2002, 07:39 AM
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... :)

blah-de-blah
November 25th, 2002, 08:06 AM
nah i don't like flashkit that much i find it real confusing because of the layout...it annoys me :*(