Broken Flash Logo
Click an error type to choose an error.

mikeduguid

ø

Sentientv2

ø

joegodfrey

ø

sinsonido

ø

Aron18

ø

Ryan Stone

ø

John Nelson

ø

Alan

ø

Nojiveturkeyhe...

ø

aleejen

ø

Kellyf

ø

dangurtner

ø

kbowen

ø

agarcia

ø

ryan

ø

· · ·

1061

Runtime Error:The value _ cannot be converted to _ without losing precision.

Adobe’s Take:
This error appears if you attempt to assign a decimal number to a property that has data type int.

This error also appears for out-of-range assignments, such as the following:

var m0:int = 2147483648; //
int.MAX_VALUE == 2147483647

You can also see this error when using the bitwise left shift operator (<<). For example, consider the following code:

var m0:uint = 0xFF;
var m1:uint = m0<<24;

The result of left shift operator (<<) is interpreted as a 32-bit two's complement number with sign. In the example, the result is a negative value, which causes the error when assigned to the uint typed property. A workaround is the following:

var m0:uint = 0xFF;
var m1:uint = uint(m0<<24);
Login/Register to make a post
· · ·