# Questions regarding the AS in making electricity

**URL:** https://forum.kirupa.com/t/questions-regarding-the-as-in-making-electricity/8582
**Category:** Uncategorized
**Created:** [November 24, 2002, 5:42am UTC](https://forum.kirupa.com/t/questions-regarding-the-as-in-making-electricity/8582 "2002-11-24T05:42:24Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![blah\_de\_blah](https://avatars.discourse-cdn.com/v4/letter/b/a8b319/32.png) [@blah\_de\_blah](https://forum.kirupa.com/u/blah_de_blah)
#### Post date: [November 24, 2002, 5:42am UTC](https://forum.kirupa.com/t/questions-regarding-the-as-in-making-electricity/8582/1 "2002-11-24T05:42:24Z")

</div>

ok well i’ve jsut downloaded eilsoes electricity thing which is here:  
[http://www.kirupaforum.com/showthread.php?s=&threadid=9406](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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [November 24, 2002, 5:46am UTC](https://forum.kirupa.com/t/questions-regarding-the-as-in-making-electricity/8582/2 "2002-11-24T05:46:50Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [November 24, 2002, 5:52am UTC](https://forum.kirupa.com/t/questions-regarding-the-as-in-making-electricity/8582/3 "2002-11-24T05:52:38Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [November 24, 2002, 5:58am UTC](https://forum.kirupa.com/t/questions-regarding-the-as-in-making-electricity/8582/4 "2002-11-24T05:58:25Z")

</div>

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).

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [November 24, 2002, 6:01am UTC](https://forum.kirupa.com/t/questions-regarding-the-as-in-making-electricity/8582/5 "2002-11-24T06:01:28Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [November 24, 2002, 6:07am UTC](https://forum.kirupa.com/t/questions-regarding-the-as-in-making-electricity/8582/6 "2002-11-24T06:07:49Z")

</div>

The tutorials that come with Flash.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [November 24, 2002, 6:26am UTC](https://forum.kirupa.com/t/questions-regarding-the-as-in-making-electricity/8582/7 "2002-11-24T06:26:36Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [November 24, 2002, 6:31am UTC](https://forum.kirupa.com/t/questions-regarding-the-as-in-making-electricity/8582/8 "2002-11-24T06:31:22Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [November 24, 2002, 6:57am UTC](https://forum.kirupa.com/t/questions-regarding-the-as-in-making-electricity/8582/9 "2002-11-24T06:57:47Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [November 24, 2002, 7:01am UTC](https://forum.kirupa.com/t/questions-regarding-the-as-in-making-electricity/8582/10 "2002-11-24T07:01:11Z")

</div>

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

Good luck finding another tutorial.

Did you search Flashkit?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [November 25, 2002, 12:39pm UTC](https://forum.kirupa.com/t/questions-regarding-the-as-in-making-electricity/8582/11 "2002-11-25T12:39:07Z")

</div>

> \*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… 🙂

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [November 25, 2002, 1:06pm UTC](https://forum.kirupa.com/t/questions-regarding-the-as-in-making-electricity/8582/12 "2002-11-25T13:06:55Z")

</div>

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