Mike T. Henderson

Interactive Design & Art Direction

Using String.search() in AS3: Determining Window Target in navigateToURL.

Jul 14 2009

I came across an instance the other day where I had a set of links; some of which where internal, while others where external. I wanted the internal links to open in the same window(target="self"), and the external links to open in a new window/tab(target="blank"). Since I was loading these links from an external json file, populated dynamically and displayed in Flash via a loop, the easy solution to determine the window target was to search for the internal domain name substring within the url string using String.search().

Continue Reading »

0 Posted under: Strings

Return Query Value -- Version 2

Feb 2 2009

http://www.mikethenderson.com?name=mike&age=27

A while back I created a little ActionScript 3 class, using the ExternalInterface.call method, that returns a query string value from the url. This came in pretty handy for things such as direct linking to certain videos within a video player, displaying campaign specific content on load based on different referring sites, ect, etc.

Upon second glance, I realized that I got a little loop-happy with the previous attempt. Below is a slimmer version with the redundancies taken out.

Continue Reading »

2 Posted under: Strings

AS3 QueryString Class

May 9 2008

Today I was working on a video player in AS3 that I wanted to be able to play any video on initial load by passing a variable through the query string. I had done this before in AS2 using the ExternalInterface class but wasn't sure if it was still valid in AS3. After a little quick research, I found that this is one thing that they left alone between the two versions.

So after a few minor AS2 to AS3 migrating, I now have an AS3 version of my QueryString class. The following app allows you to search through a query string for a value of a specified variable. To test, add a query string to the url and play.

Continue Reading »

9 Posted under: Strings
Click to load more posts...