1004: Namespace was not found or is not a compile-time constant.
The lines called out in the package are:
use namespace mx_internal
and
mx_internal static var c:uint;
I don't know the first thing about namespaces, but does anyone know how to get this package/class working in CS4 AS3? It might be something simple I am missing.
I have attached the .as package file (uploaded as a txt file) if anyone wants a look...
Any help would be appreciated. I am having to get a lot of lists from a mySQL database and it is becoming a real pain urlencoding them all manually. If I could just urlencode(serialize($result)); in php and send that file to AS3 to be decode it would be so much simpler.
I can't really go back and compile with the flex compiler, I have a lot of layout and UI elements created in the flash API. I much prefer doing UI's visually than in flex.
Is there no easy way to change that .as file to compile properly with Flash? It seems like a horrible idea to make things as simple as classes not transportable between flex and flash.
They weren't actually using any flex code at all. All they were using was a namespace that was not even required. I just removed the include and deleted all references to the mx_internal namespace and now the class works great!
Very cool! Now I can send full objects from php to flash with extremely little effort. Whole database results just urlencoded and serialized to be sent back as text and then be re-created in flash with one line of code as a native flash object. Wonderful!