Conditional includes in ActionScript 3.0

This morning I have looked for a way to include another .as file depending on a variable. ActionScript 3’s include does not allow you to use variables, as it only accepts string literals.

The reasoning for this is that include is fired on compile time, so any variables are not set, determined, or even defined yet.

The Solution

Reading an article, I came across the solution — Config Constants. These are defined in your ActionScript 3.0 settings (File > ActionScript Settings > Config Constants ). Here you can define compile-time constants, and have functionality depend on them.
Continue reading Conditional includes in ActionScript 3.0

Reading $_GET values from a URL String in PHP

Reading $_GET values from a URL String in PHP was something I had been interested in for a while. It was quite simple to read the $_GET values from the current page’s URL (obviously), but what if you were using AJAX and passing a URL to figure out what data needed to be passed/used? There’s several other reasons why you may need this, but I digress.

While looking for a way to read $_GET variables from a string in PHP, I stumbled across this forum post on Stack Exchange.

parse_str( parse_url( $url, PHP_URL_QUERY ), $array );

Continue reading Reading $_GET values from a URL String in PHP