Flex # 1009 error: cannot access property or method of reference to null object

I get an error while starting the game that I created using flex. I know that there is some question, but my case is rather strange. I created a simple text-entry game that runs on my computer, but when I tried to deploy it on the Internet on facebook, I got these errors. I used the code from a tutorial from adobe here http://www.adobe.com/devnet/facebook/articles/flex_fbgraph_pt4.html to deploy my facebook flash game

This error message is:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at FacebookUserStatusWeb/init()
    at FacebookUserStatusWeb/___FacebookUserStatusWeb_Application1_creationComplete()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent()
    at mx.core::UIComponent/set initialized()
    at mx.managers::LayoutManager/doPhasedInstantiation()
    at mx.managers::LayoutManager/doPhasedInstantiationCallback()

And here is a fragment of the init () function:

            protected var text1:String="Text to be typed"; //hard-coded temporarily
            protected const TIMER_INTERVAL:int = 10;
            protected var t:Timer = new Timer(TIMER_INTERVAL);
            protected var topURL:String=ExternalInterface.call('top.location.toString');
            protected function init():void
                    {
                        t.addEventListener(TimerEvent.TIMER, updateTimer);
                        ProblemText.text = new String(text1);
                        Facebook.init("<my app id>",loginHandler);
                        currentState = (topURL) ? "loggedout": "loggedoutonfacebook";
                    }

: 1.my id - facebook, 2.ProblemText - , , . 3. Application1_creationComplete(), -

, . ? , ,

+3
2

: . , # 1009, , .

, , . , , , , .

: , - init() , , , . ( , ) , , , - , , . , , , , , , null. - , , . , =)

!

+4

- . , , , , facebook, (loggedin, loggedout ..). init() ProblemText, .

0

All Articles