Text Effect is a very common feature for many online application. Today, I am going to introduce you a simple, but also beautiful, text effect application. It’s time to decorate your application!
Comparison
Flash implementation: 70 minutes (Implemented First)
Silverlight implementation: 80 minutes
What’s the difference?
- String to ASCII Code: charCodeAt [AS3] vs Convert.ToInt16 [C#]
Source codes
Simple Text Effect [Flash 9, AS3] (142.4 KiB, 3,251 hits)
Simple Text Effect [Silverlight 2, C#] (20.6 KiB, 4,911 hits)
Flash
Silverlight
String to ASCII Code: charCodeAt [AS3] vs Convert.ToInt16 [C#]
When you are working with text, you shouldn’t miss out the following following codes which convert a string value and ASCII code.
// AS3 var text:String = "Testing"; // Get the ASCII code for the character "T" text.charCodeAt(0) // Get the string value of the ASCII code 80 var char:String = String.fromCharCode(10);
In C#, you can achieve the same result by using the System.Convert Class.
// C# String text = "Testing"; // Get the ASCII code for the character "T" Convert.ToInt16(text.ToCharArray()[0])); // Get the string value of the ASCII code 80 String char = Convert.ToChar(80).ToString();
