1067 errors in Actionscript
If you are using Actionscript 3 and getting this error:
it's because you need explicitly cast a value that is a number into a string. This often happens (to me) when I am building up a string using numbers. For example, this code will throw a 1067 error:
If you want to do this without getting the 1067 error, cast the number explicitly like this:
1067: Implicit coercion of a value of type Number to an unrelated type String.
it's because you need explicitly cast a value that is a number into a string. This often happens (to me) when I am building up a string using numbers. For example, this code will throw a 1067 error:
var temperature:Number = 65; var text:String; text = temperature + " F";
If you want to do this without getting the 1067 error, cast the number explicitly like this:
var temperature:Number = 65; var text:String; text = String(temperature) + " F";
| Rating: | no ratings, 0 total Votes |
| Categories: | actionScript Flash Adobe programming |
| Added: | on Jun 17, 2008 at 9:28 pm |
| Added By: | an anonymous user |

