Archive for the tag 'String'

Converting Strings To Booleans

If you’ve downloaded my Image Slider, you may have looked at the Main.as file and noticed that I was using a utility class to convert the loaded string values for things that are actually booleans from the XML. I was originally loading them and I couldn’t figure out why when I traced out what was supposed to be a Boolean value set to “true” it was tracing out as “false”. The reason is that when you load the String “true” into Flash, “true” is not a Boolean but a String, so when you test for it it returns “false”. I knew it was a scoping issue but Tom Stanley explained to me why this was happening. Here is a quick rundown of how to do this. Read more »

Tags: , , , ,