Posted on: January 28, 2011
Edit: This just seemed to eventually start working for me out nowhere. I hate when that happens. If you’re having the same problem I recommend you go have a beer and come back to it later.
This is pissing me off. I have some Javascript that looks like this:
var boz = {
thing: function(val) { alert(val); }
}
I want to call it from Flash using ExternalInterface like this:
ExternalInterface.call("boz.thing", "what the shit!?");
…but that doesn’t work.
Somebody asked about this on StackOverflow (here) and in the accepted answer the guy says the code is basically just eval’d so it’ll work just fine. He has an example like this:
ExternalInterface.call("function (foo) { alert(foo); return true; }","test");
That doesn’t work either. I can only seem to get it to work with global function calls. Am I missing something? There certainly doesn’t seem to any examples of calling namespaced Javascript from Flash out there.
I’ll post back if I find out what’s going on.
Piece.
Category: Actionscript, Flash, Javascript
Posted on: September 28, 2010
If you try to call a function within Flash from Javascript and that function has the intention of calling a FileReferenceList.browse() it’s not going to work. It’s a security thing. You need to use an in-movie button. Even if you have the JS call a function which calls another function that calls FileReferenceList.browse() it’s still not going to let you do it. I wasted some time figuring this out. Just give up.
This guy had the same issue: http://kevinmusselman.com/blog/2009/01/multiple-file-upload-using-flash/
Category: Actionscript, Flash, Javascript
Posted on: March 13, 2010
Select your text and then go TextFX -> TextFX Tools -> Word Count
Category: Flash
Posted on: December 17, 2009

I made this Flash e-learning project years ago for a college assignment. It’s fully animated with quiz sessions by a bogus Bill Cosby. For some reason, even though I put a ton of work into it and everybody liked it, I never thought much of it myself. Now, several years later I pulled it back up and laughed my ass off.
It’s been sitting on my server all ready to show off for years, but I thought I’d give a shout out to it on this blog. Maybe someone can learn something!
Check out The Life of Shakespeare
Category: Animation, Flash
Posted on: October 1, 2008
Problem:
You publish your SWF from the Flash CS3 IDE and everything looks fine. You, or someone else checks out the SWF in a browser and although everything kind of works, certain elements like text fields and component buttons aren’t rendering properly!
Solution:
Sometimes certain revisions of the Flash 9 player behave differently than expected, but there is a way you can look into it. Read on…
(more…)
Category: Actionscript, Flash
Posted on: September 19, 2008
Adding some shading to characters and objects is a good way to add some depth to your flash animations. The following tip may be an obvious one, but if it’s new to you it may be one of the handiest tips you ever get.
(more…)
Category: Animation, Flash
Posted on: September 11, 2008
Problem:
You want to save an image from Flash to a server using Actionscript 3.0 and ASP.NET.
Solution:
Read this article!
(more…)
Category: Actionscript, ASP.NET, Flash
Posted on: July 31, 2008
Note: This is almost exactly the same solution I posted earlier for rotating an object around its center point (Actionscript 3.0: Rotate Around Center Point). I thought I’d post this slightly altered solution for people who need it.
Problem:
You need to scale a movieclip/sprite from its center point, but its registration point is at (0,0) and you can’t and/or don’t feel like putting this object in the center of a container movieclip and rotating that
Solution:
TCBWMO (Take care of business with the matrix object).
(more…)
Category: Actionscript, Flash
Posted on: July 21, 2008
Problem:
You’re working some math equations with Actionscript and tracing the results when you notice some results are off by a very small value.
output:
2
2.1
2.2
2.3
2.4
2.5000000001
2.6
2.7000000001
2.8
2.9
3
Solution:
This is called a floating point error and is apparently a normal computing error that affects all aspects of computing, not just flash. You can fix this by running the values through the correctFloatingPointError function I’ve posted below.
(more…)
Category: Actionscript, Flash
Posted on:
Recently I got back into Flash and began to learn Actionscript 3.0. Things have definitely come a long way in the last few years, and I’ve become interested in Adobe’s quest to turn the Flash format into a full fledged rich internet application framework of sorts. I’m surprised, and personally impressed on how far all this has come. Here’s a couple things I’ve come to realize (or knew about, but never dived into) in the last year or so:
(more…)
Category: Flash