Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

Math Addition Operator Question

$
0
0

Hi there,

I'm trying to write a very simple math equation:

 

var gal_width = 100;
var m_box_pos = 2000;

var total = (gal_width+m_box_pos);

 

When I display this in a text element, the numbers are shown together rather than being added together

(eg: 1002000)

 

I get the feeling Edge is interpreting the + as a string operator rather than a math operator.

Replacing the + with a - (as a test), the 2 numbers are being subtracted.

Multiplying the numbers with the * operator also works as it should.

 

I've tried many configerations, escaping the operator with no luck.

 

Any ideas of how to get addition to work?

 

Thanks


Viewing all articles
Browse latest Browse all 9897

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>