Archive for August, 2006

Unexpected “Gotcha” with Relative Paths in ActionScript

Friday, August 25th, 2006
Flash ActionScript 2.0

About a month ago, I mentioned a quirky fact of life when dealing with relative paths in ActionScript.  In a nutshell, a SWF’s point of view changes depending on how it’s embedded.  A SWF considers relative paths from its own folder when played in a Projector.  That makes perfect sense.  On the other hand, a SWF embedded in an HTML document, as played by the Flash Player plug-in, sees things differently.  To a SWF in an HTML document, relative paths begin from the folder of the HTML document.

For example, if a root HTML document embeds a SWF in a flashcontent subfolder, and if that SWF loads a JPG from the same folder as itself, the ActionScript must nevertheless include a reference to the flashcontent subfolder — because that’s where that JPG is located from the HTML’s point of view.  This can quickly confuse matters when you test the SWF from inside Flash, because the Flash IDE plays SWFs inside a special Projector (see (Perhaps) Unexpected Point of View:  SWF Defers to HTML for some workarounds).

That’s a “gotcha” enough already, but I just discovered an exception to the rule.  Keep reading »

What Fonts are Common to Windows and Mac?

Tuesday, August 22nd, 2006

Building a Drag-and-Drop Jigsaw Puzzle

Monday, August 21st, 2006

How to Drag Clock Hands in a Circle

Wednesday, August 16th, 2006

How to Tell a SWF What File(s) to Load — From the Outside

Sunday, August 13th, 2006

Papi’s Wah-feh (An Audio Guide)

Tuesday, August 8th, 2006

How to Constrain Dragging to an Ellipse

Monday, August 7th, 2006

How to Constrain Dragging to a Circle

Thursday, August 3rd, 2006

Need Filler Text?

Tuesday, August 1st, 2006