Nov 16, 2010Programming
Functions are useful tools that allow you to reuse code, reducing file size and keeping your application better organized. There is a trade-off however, and that is function overhead. An Actionscript 3 application will take a small hit in performance when moving a section of code out of the normal flow of the program and into a function.
Nov 5, 2010Programming
Unsigned integers are integers that can be positive values only. They are useful to have in programming languages because they can hold a higher maximum positive value than a signed integer, without using additional memory. For example, int in Actionscript 3 is a 32-bit signed integer and can hold a range from -2,147,483,648 to 2,147,483,647, while uint is a 32-bit unsigned integer and can hold a range from 0 to 4,294,967,295. It is useful to use unsigned when dealing with large counters that will never be negative, as it gives you a higher maximum.
Sep 16, 2010Programming
Having a code block allows you to display code without it being interpreted as HTML. Code blocks are used extensively on programming-related forums and websites so users can show other users the code they use, like this:
Feb 19, 2010Programming
While creating a dynamic music player for the web in flash (AC3) I ran across a bit of an issue. When attempting to get the length of a song using the .length function, flash only returns the length of what it has loaded so far. Until the sound is fully loaded, flash is unable to tell you the length in seconds of that sound file. I found a solution that works well and doesn't rely on the length being manually inputted or pulled from the ID3 tags.
Feb 19, 2010Programming
If you've been developing in ASP 3.0 (classic ASP) you may be used to calling the response.redirect() function whenever you need to redirect a user to a different page. You could call this function anywhere in the page, which was convenient. Now that you're using PHP, you may be a little confused about how to redirect. In PHP, you redirect using the header() function and it must be called before any HTML. Like so:
NewerPage 5Older