I'm using Joseph's Actionscript 3 library and am making a simple request:
MySpaceContainer.instance.init(Application.application.parameters.opensocial_token, Application.application.parameters.opensocial_surface);
var dr:MSDataRequest = opensocial.newDataRequest() as MyOpenSpace.MSDataRequest;
dr.add(dr.newFetchPersonRequest(DataRequest.PersonId.VIEWER), "viewer");
The app compiles just fine but when I upload it to put on the canvas page, the opensocial_token/surface is valid but I get a null pointer exception in the opensocial.newDataRequest(). From looking at the error, it looks like Flash is getting confused between the Flex Container class and the opensocial.Container class. Has anyone else run into this when making a Flex/AS3 app? How do I get around this?
I'm thinking somewhere in the library it needs to be more specific on that it's using opensocial.Container.
The exact error I'm getting is:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at App()[F:\Dev\flash\Game\App.as:148]
at mx.core::Container/createComponentFromDescriptor()[C:\dev\flex_201_gmc\sdk\frameworks\mx\core\Container.as:3619]
Somehow it's trying to use mx.Container instead of opensocial.Container