Skip to Content »

FlashApe » archive for October, 2004

 PHP Documentation Within TextMate

  • October 27th, 2004
  • 1:53 am

While checking out something on the TextMate site in repsonse to ericd’s post about compiling your AS in TM, I can across something else pretty cool: PHP documentation from within TextMate

 Determining browser through Object Detection

  • October 12th, 2004
  • 1:14 pm

Found an interesting article on the Apple Developer’s Connection that talks about the benefits of using Object detection to determine a user’s browser. The article talks about the many pitfalls of using the more common “browser-sniffing” method of searching the Navigtor object to determine version info.
From the article:
Browser sniffing Ñ the task of inspecting navigator object properties for version information Ñ has become largely unmanageable given the browser version permutations available today. This article presents details on an alternative solution Ñ object detection Ñ that frees JavaScript developers from most of this versioning mess.

 Realigning images

  • October 4th, 2004
  • 5:09 pm

There’s probably a better way to do this, but I thought it was decent so here it is. I do A LOT of work with loading a series of variable-sized images into a blank “canvas” clip at one time. So i go through the motions of creating a loop and creating the movie clips that will load the images. Now since the images are all going to be variable width or height, I can’t just set the positions of the loading clips, becasue the images might overlap. After checking to make sure that all of the images are properly loaded, I call this function:

bc[as]. private function realignImages (clip:MovieClip, axis:String, gap:Number, startPos:Number){
trace(”realigning images”);
var next = startPos;

var getArea;

(axis == “_y”) ? getArea = “_height” : getArea = “_width”;

for (var prop in clip){
if (typeof clip[prop] == “movieclip”){
clip[prop][axis] = next;
next += clip[prop][getArea] + gap;
}
}

}

and I use it like so:

bc[as]. realignImages(bannerCanvas, “_x”, yGap, numBanners, 0);

You just pass in the clip holding the images, the axis you want to align the clips on, the spacing between the images, and the starting position the first img. The “numBanners” and “yGap” in the sample above were just variables i had set earlier. Obviously this will align all movieclips inside the clip that you pass to the function, so be carefull if you’re creating other clips int here as well.

Pretty small time I know but maybe someone out there can use it.

 Project for The New Amercan Century

  • October 2nd, 2004
  • 10:38 am

Got pointed to this yesterday. It’s called Project for the New American Century, and here’s their statement from their homepage:

bq. The Project for the New American Century is a non-profit educational organization dedicated to a few fundamental propositions: that American leadership is good both for America and for the world; that such leadership requires military strength, diplomatic energy and commitment to moral principle; and that too few political leaders today are making the case for global leadership.

Apparently the idea is to create a “unipolar” world in which America dominates, particularly by means of military force. From what I can gather, this project is heavily tied into the Bush administration (still getting the exact details on that, but I was told people such as Cheney and Rumsfeld were part of the original proposition), and is a big reason for the invasion of Iraq (and there are already rumblings that Iran is next).

There’s another site which “exposes” the Project for the News American Century, and that is at pnac.info. The site is “An effort to investigate, analyze, and expose the Project for the New American Century, and its plan for a ‘unipolar’ world.”

I found both to be an extremely interesting read and a huge eye-opener on the state of the world today.