hi, i have a funny error with variables that instead of adding values from 2 variable it combines them, altough both has been declared as Number, these vars should be all numbers because im going to use them to locate the center of a image loaded to mc via loadClip, i tested with simple boxes the script works but here it becomes weird
tried parseInt() with no result, are there any way to fix this?
for the codes on the top i declared
var full_x:Number
var full_y:Number
var defaultWidth:Number
var defaultHeight:Number
then when the fulllx and y has been filled, i use those var to calculate this
var xCenter:Number = Math.floor(((defaultWidth - target._width) / 2) )
var yCenter:Number = Math.floor(((defaultHeight - target._height) / 2))
finalX = Math.floor(xCenter + full_x)
finalY = Math.floor(yCenter + full_y)
so the traces return full_x = 350 and full_y = 35
and the xCenter returns = 1 the yCenter returns = 114
however the finalX and Y each returns – 1350 and 11435, so somehow flash thought my vars are strings and combine them instead of adding values…