# I hate the way flash just seems to distroy math formulas!

**URL:** https://forum.kirupa.com/t/i-hate-the-way-flash-just-seems-to-distroy-math-formulas/104429
**Category:** Uncategorized
**Created:** [March 16, 2004, 3:36am UTC](https://forum.kirupa.com/t/i-hate-the-way-flash-just-seems-to-distroy-math-formulas/104429 "2004-03-16T03:36:32Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Hi\_Nu](https://avatars.discourse-cdn.com/v4/letter/h/91b2a8/32.png) [@Hi\_Nu](https://forum.kirupa.com/u/Hi_Nu)
#### Post date: [March 16, 2004, 3:36am UTC](https://forum.kirupa.com/t/i-hate-the-way-flash-just-seems-to-distroy-math-formulas/104429/1 "2004-03-16T03:36:32Z")

</div>

ok You all know the formula y = mx+b, flash seems to hate it  
To run this code you will need a black bacground and a MC with the AS export name of ng.  
[AS]\_global.Slopes = [];  
function mapEngine() {  
firstTurraneX = Math.random()\*100;  
firstTurraneY = 250;  
moveTo(0, 250);  
do {  
slY = firstTurraneY;  
slX = firstTurraneX;  
firstTurraneX = firstTurraneX+250-Math.random()_200;  
ifNumber = Math.random()50;  
if (ifNumber\>25) {  
firstTurraneY += Math.random()100;  
} else {  
firstTurraneY -= Math.random()100;  
}  
lineStyle(1, 0xFFFFFF);  
lineTo(firstTurraneX, firstTurraneY);  
slKey = (-firstTurraneY+slY)/(-firstTurraneX+slX);  
combo = {slope:slKey, xBig:firstTurraneX, xSmall:slX, bSetter:slY};  
Slopes.push(combo);  
} while (firstTurraneX\<500);  
}  
var test = mapEngine();  
Slopes.reverse;  
na = attachMovie(“ng”, “k”, 100);  
na.\_y = 250;  
\_global.i = 0;  
\_global.B = 250  
onEnterFrame = function () {  
na.\_x++;  
M = Slopes.slope;  
gX = Slopes.xBig;  
lX = Slopes.xSmall;  
na.\_y = M_na.\_x+B;  
if ((na.\_x\>gX)) {  
i++  
B = na.\_y  
trace(B);  
}  
};[/AS]  
as you can see it jump arround more than a mexican bean, so any help would Gravely help me  
Thanks In Advace  
Hi-Nu
