Posts Tagged ‘bug’

AS3 Bug of the Week (again? Yes, again)

URLDecoding is one of those things that makes life a little bit more of a pain.

the idea is that in a typical URL certain characters are not allowed; for instance an % or an $ or & are used for functions in URLs, and can thus not be used. Now that is a pain, since some URLs need them. For instance needs to be escaped as the space and the ampersand cannot be used directly. This is done with a %26 sign; ( Every decent programming language has a function called escape or URIdecode to do this for you.

Flash has it too, you can find it in the manual however, it escaped %23, %24 and %26 the %25 escape (the %-sign) is strangely missing and will throw an error.


Because the people at Adobe want to kill me. Or so I think. Why?! Why can’t I escape %-signs?!

The workaround is simple, and reads something like:

function escapeURL(someURL:String):String {
 someURL = someURL.split("%").join("P")
 someURL = URLDecode(someURL)
 return someURL

In the split I replace the % signs with P’s, cuz’ if i was to replace them with %25 it still crashes.

Why, Adobe?! WHY…

Posted: June 15th, 2010
Categories: nerd, technology, web, work
Tags: , , , , , , , ,
Comments: No Comments.

Flash AS3 Bug of the Week

SecurityError: Error #2121:  Security sandbox violation: SoundMixer.computeSpectrum:  
cannot access
This may be worked  around by calling Security.allowDomain.
at  app::Spectrum/onLoop()

So. I was tinkering with a ComputeSpectrum function in, Flash for Marduq, which basically gives you a music equalizer display. Little bars going up and down with music.. Nifty. So I build it in and started to get really weird security bugs. First I thought it my allowDomain(*) then my crossDomain.xml policy files. Then I asked Urias. Then Daniel. Then I started to scream and bitch and moan. Then I started drinking beer. Then, finally, I found this bug report: [#FP-147] which basically told me to write the fucking spectrum analyzer myself.

It’s these kind of bugs that makes me want to switch platform.


Posted: April 13th, 2010
Categories: nerd, research, site, technology, work
Tags: , , , , , , , , , , , ,
Comments: No Comments.