Error #1009: RPC Fault - (Really strung out here!)

Did some searches on this but can't seem to find anything
definitive. I have an ASP.NET Web Service that I have test via IE
and it is working. I have FB2 and FDS, but just trying to call a
simple WebService direcly like (extracts of the code below):
============================================
<mx:WebService id="srv"
useProxy="false"
wsdl="
http://localhost/RM_Starter/Find_Patterns.asmx?wsdl"
>
<mx:operation name="ShowMyPatterns" >
<mx:request>
<param1>
param1
</param1>
<param2>
param2
</param2>
</mx:request>
</mx:operation>
</mx:WebService>
================================
And I fire off the send from a button like this. I know this
gets fired off and works and I see IIS log the GET for it:
private function initBtn():void
srv.ShowMyDayPatterns.send();
=======================================================
But when that fires I get the following error message:
[RPC Fault faultString="Error #1009: Cannot access a property
or method of a null object reference." faultCode="EncodingError"
faultDetail="null"]
at mx.rpc.soap::Operation/
http://www.adobe.com/2006/flex/mx/internal::invokePendingCall()[C:\dev\enterprise_gmc\fram eworks\mx\rpc\soap\Operation.as:582
at mx.rpc.soap::Operation/
http://www.adobe.com/2006/flex/mx/internal::invokeAllPending()[C:\dev\enterprise_gmc\frame works\mx\rpc\soap\Operation.as:428
at
mx.rpc.soap::WebService/mx.rpc.soap:WebService::unEnqueueCalls()[C:\dev\enterprise_gmc\fr ameworks\mx\rpc\soap\WebService.as:861]
at mx.rpc.soap::WebService/
http://www.adobe.com/2006/flex/mx/internal::wsdlHandler()[C:\dev\enterprise_gmc\frameworks \mx\rpc\soap\WebService.as:667
at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at
mx.rpc.soap::WSDLParser/dispatchEvent()[C:\dev\enterprise_gmc\frameworks\mx\rpc\soap\WSDL Parser.as:788]
at
mx.rpc.soap::WSDLParser/mx.rpc.soap:WSDLParser::parseCompleted()[C:\dev\enterprise_gmc\fr ameworks\mx\rpc\soap\WSDLParser.as:305]
at mx.rpc.soap::WSDLParser/
http://www.adobe.com/2006/flex/mx/internal::httpResultHandler()[C:\dev\enterprise_gmc\fram eworks\mx\rpc\soap\WSDLParser.as:181
at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
IT WASN"T THIS HARD BEFORE! Is there something in the FDS
files that have to be configured? What am I missing here?

FlashPlayer 9.0.124 has increased restrictions with its
security model.
For URL based access (FlashLoader) you need the
crossdomain.xml in the server root. For socket based access you
need a socket policy file and a policy file server (assumingly).
I haven't been able to get the latter working. See my cry for
help here:
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=60&catid=585&threadid =1360744
Adobe has more info here:
http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security.html

Similar Messages

  • RPC fault when calling a CFC from flex

    Hello there,
    I'm having some startup problems getting Flex and Colfusion 8
    to play nice with FDS. I'm using Flexbuilder 2.0.1 and Coldfusion 8
    developer edition on IIS on a windows box (XP professional).
    I use a very simple test CFC in my coldfusion site with just
    one function called 'getstring' which, surprise, surprise returns a
    string. I want to show this string on a label in my Flex frontend
    by using <mx:remoteobject>, the whole thing compiles
    perfectly, I use this mxml:
    <mx:RemoteObject id="TestService"
    source="cfc.DataTest"
    destination="ColdFusion"
    concurrency="multiple"
    makeObjectsBindable="true"
    showBusyCursor="true">
    <mx:method name="getString"
    result="doResult(event.result)" fault="doFault(event.fault)"/>
    </mx:RemoteObject>
    but after calling the remote method I get this error back:
    [RPC Fault faultString="coldfusion.xml.rpc.CFCServlet cannot
    be cast to coldfusion.runtime.CFPage" faultCode="Server.Processing"
    faultDetail="null"]
    Which is the same type of error I get when I call a CFC
    directly through the address bar in my browser, for example
    http://localhost/cfc/datatest.cfc
    I tried googling the error message but so far found nothing
    that indicated what I'm doing wrong...
    I'd really appreciate some help here, if you need more info
    let me know...
    thanx in advance

    Ok, nevermind, I figured out what I was doing wrong. I had
    accidentally setup my application.cfc in a wrong way, I had set all
    of the onrequest en onapplication event handlers to
    access="package" instead of "public", this generated an error
    ofcourse...
    I'll just go bang my head against a wall for a while
    now....

  • RPC Fault

    I built a simple RPC web service, deployed successfully on
    Tomcat/Axis2-1.3. I tested it and it is working.
    I built a "SimpleWeatherClient.mxml" that seems to send the
    request to the server, receive a response, but fail to process the
    result. I've attached the error message, the source code for the
    client, and the WSDL. Is this a bug?
    Error message:
    [RPC Fault faultString="Cannot find definition for type '
    http://data.pojo.sample/xsd::Weather'"
    faultCode="DecodingError" faultDetail="null"]
    at mx.rpc.soap::Operation/
    http://www.adobe.com/2006/flex/mx/internal::processResult()
    at mx.rpc::AbstractInvoker/
    http://www.adobe.com/2006/flex/mx/internal::resultHandler()
    at mx.rpc::Responder/result()
    at mx.rpc::AsyncRequest/acknowledge()
    at private::DirectHTTPMessageResponder/completeHandler()
    at
    flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/flash.net:URLLoader::onComplete()
    at [io]

    Any chance you could try out a nightly build of the Flex 3
    SDK Beta from Adobe Labse?
    http://labs.adobe.com/technologies/flex/sdk/flex3sdk.html
    If you're using Flex 2.0.1, some fixes have been backported
    to the Flex 2.0.1 branch and are also available through the night
    builds on Labs:
    http://labs.adobe.com/technologies/flex/sdk/flex2sdk.html

  • TypeError: Error #1009 - I know how to fix it. But I don't know whats going on!

    I have a project that I’m working on that includes working in different scenes and frames. It’s a book project with lots of pages (frames) and chapters (scenes) so I have can’t avoid working in a single frame (like a game). I get a runtime error (TypeError: Error #1009: Cannot access a property or method of a null object reference.) when accessing an object inside of a movieclip. However, I have identified the problem and know how to fix it. But when I fix it the functionality goes away. Here’s how it happens:
    On frame #1 of Scene 2 I click on a button to go to a frame #2.
    On frame #2 is the offending code:
         stage.addEventListener(MouseEvent.MOUSE_UP, moveChapters);
    //********************Navigation Bar code ********************//
    function moveChapters(event:MouseEvent):void
            if(event.target == bottomNav.Chapter_1)
            trace("Chapter #1 is working!");
    FYI, this code is part of a navigation bar the will take the user to different chapters. It is visible on stage. I haven't fully built it yet. For example, "if( event.target == bottomNav.Chapter_1)" will take the user to chapter 1, "bottomNav.Chapter_2," will take the user to chapter 2, so on and so forth. "bottomNav" is a movieclip and "Chapter_1" is a button inside it.
    When I go back to frame #1 of Scene 2 and then click on “Home” button to go back to the main page (Frame #1 of Scene #2) I get the Error #1009.
    When I comment out the “if(event.target == bottomNav.Chapter_1)” I don’t get the error but know I don’t have any functionality.
    Is there a better way to do this?

    Adding the event listener to the stage for this sort of functionality is a bad idea. Even though Flash can, apparently, resolve the objects inside the movieClip, you are making the connection between the object and the event that you want to capture more difficult than it should be. A better approach is to place all of the target objects into an array and then attach the event listener to each object in the array. Then you can easily extract the target from the event.
    Something like this might work for you:
    var chapterList:Array = new Array(bottomNav.Chapter_1,bottomNav.Chapter_2,bottomNav.Chapter_3);
    for(var i in chapterList) {
         chapterList[i].addEventListener(MouseEvent.MOUSE_UP,moveChapters);
    function moveChapters(event:MouseEvent):void {
         var thisChapter:Object = event.target;
               //  etc

  • Getting error #1009 desperately need help

    Ive created a search engine in flex no to elaborate and it
    works to a certain extent. the timeline is i input a word and hit
    the search button it sends the word to a php script that looks in
    the database for entries in a table that match then returns the
    values of the rows to the php file and spits out an xml file. The
    xml is then parsed by the search engine and the nodes are put into
    an array collection whos data is then used by my itemRenderer to
    populate a list component.
    Now the problem i have is that if i input a search word that
    i know has more than one entry in the database all the code works
    the search works and it populates the list properly. However if i
    input a word that has only 1 or no entry it get the error #1009 and
    i cant figure out why. i kind of understand if the arrayCollection
    has nothing in it since its a null object but when i know theres an
    entry it makes no sense why its spitting that error out.. heres my
    mxml code for the search engine..Thank you in advance to any who
    can help me..

    Would you be able to elaborate on how to go about it..ive
    tried putting it into and xmllistcollection and a couple of other
    ways but i still get either the same result or i get another error
    because of a failed coercion i believe..thanks for the help so far
    any other help would be appreciated..

  • Cairngorm - RPC Fault Error

    I am calling a web service to update. If I click the very
    first time everything works fine. If I then click again I get the
    error below. All I am doing is passing one AS VO object and
    poulating it with fields from a page. Since this works the first
    time, I feel the issue is with the web service. I'm using the
    Cairngorm framework but based on the message it looks more like a
    RPC error than anything. Can anyone help?
    [RPC Fault faultString="Array of input arguments did not
    contain a required parameter at position 2"
    faultCode="Client.Input" faultDetail="null"]
    at
    mx.rpc.soap::Operation/mx.rpc.soap:Operation::createFaultEvent()
    at mx.rpc.soap::Operation/
    http://www.adobe.com/2006/flex/mx/internal::invokePendingCall()
    at mx.rpc.soap::Operation/send()
    at Function/
    http://adobe.com/AS3/2006/builtin::apply()
    at mx.rpc.soap.mxml::Operation/send()
    at Function/
    http://adobe.com/AS3/2006/builtin::apply()
    at mx.rpc::AbstractService/
    http://www.adobe.com/2006/actionscript/flash/proxy::callProperty()
    at aware.business::AwareDelegate/SaveGeneralUser()
    at aware.commands.user::UpdateGeneralUserCommand/execute()
    at
    carirngorm.control::FrontController/adobe.cairngorm.control:FrontController::executeComma nd()
    at
    flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at
    adobe.cairngorm.control::CairngormEventDispatcher/dispatchEvent()
    at
    aware.view.user::PreferencesViewViewHelper/updateAllGeneralUserInfo()
    at aware.view.user::PreferencesView/___Button1_click()

    I have not figured this out yet. I have searched everywhere
    and event posted the same question here
    http://renaun.com/blog/2007/01/20/178/
    This guy has the Cairngorm store example using web services,
    data services, etc. His code is the exact same as mine. He uses a
    Coldfusion web services though.
    Are you using the exact setup as me? Jrun 4 and calling the
    Axis web service from Flex? Surprised this issue hasnt been solved
    since there seems to be a lot of people building flex applications.
    Hopefully someone will help soon.
    thanks for responding

  • RPC Fault faultString="HTTP request error"

    Hi I built a project from an existing fxp file.. But when I try to run it I receive tthis error.. What is wrong??
    [RPC Fault faultString="HTTP request error" faultCode="Server.Error.Request" faultDetail="Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032:
    I am sure that the fxp file is correct as I tested it to another computer.....
    Please it is urgent!!
    the whole error is this
    [RPC Fault faultString="HTTP request error" faultCode="Server.Error.Request" faultDetail="Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://localhost:8888/*/Applications/MAMP/htdocs/*/php/get_course.php"]. URL: http://localhost:8888/*/Applications/MAMP/htdocs/V3_tutor_for_CODE_2/php/get_course.php"]
              at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[C:\autobuild\3.x\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:290]
              at mx.rpc::Responder/fault()[C:\autobuild\3.x\frameworks\projects\rpc\src\mx\rpc\Responder.a s:58]
              at mx.rpc::AsyncRequest/fault()[C:\autobuild\3.x\frameworks\projects\rpc\src\mx\rpc\AsyncReq uest.as:103]
              at DirectHTTPMessageResponder/errorHandler()[C:\autobuild\3.x\frameworks\projects\rpc\src\mx \messaging\channels\DirectHTTPChannel.as:368]
              at flash.events::EventDispatcher/dispatchEventFunction()
              at flash.events::EventDispatcher/dispatchEvent()
              at flash.net::URLLoader/onComplete()

    Maybe the URL you are accessing is not available from that computer.

  • Is this really an out of memory error?

    I get the following output from running the pl/sql script below. I can't believe this is an actual out of memory error because the query involved returns only 51 rows. If I run the cursor query from the command line it takes about 5sec and returns 51 rows. The server this is running on is doing nothing else. We successfully run pl/sql scripts that use huge amounts of memory on this server and have never seen this error.
    Any idea what could be going on here?
    SQL> exec test_obis_admin.find_invalid_dates('royals_census_1984')
    find_invalid_dates
    year collected=1953
    year collected=1953
    year collected=1953
    year collected=1953
    year collected=1953
    year collected=1953
    year collected=1983
    year collected=1983
    year collected=1996
    year collected=1996
    year collected=1996
    year collected=1996
    year collected=1996
    year collected=1996
    year collected=1996
    year collected=1972
    year collected=1972
    year collected=1996
    year collected=1996
    year collected=1996
    year collected=1996
    year collected=1972
    year collected=1972
    year collected=1976
    year collected=1976
    year collected=1976
    year collected=1976
    year collected=1976
    year collected=1976
    BEGIN test_obis_admin.find_invalid_dates('royals_census_1984'); END;
    ERROR at line 1:
    ORA-04030: out of process memory when trying to allocate 16396 bytes (koh-kghusessi,pl/sql vc2)
    -- find and identify rows containing invalid date component
    PROCEDURE find_invalid_dates ( res_name varchar2 ) IS
         date_temp DATE ;
         CURSOR date_components IS SELECT
         a.id,
         a.yearcollected,
         a.monthcollected,
         a.daycollected,
         a.startyearcollected,
         a.startmonthcollected,
         a.startdaycollected,
         a.endyearcollected,
         a.endmonthcollected,
         a.enddaycollected
         FROM expandeddigircache a WHERE a.res_name=res_name ;
         date_fields date_components%ROWTYPE ;
    BEGIN
         print('find_invalid_dates') ;
        OPEN date_components ;
        LOOP
            fetch date_components into date_fields ;
            exit when date_components%NOTFOUND ;
            print('year collected=' || date_fields.yearcollected ) ;
       END loop;
        CLOSE date_components ;
    END find_invalid_dates ;\

    As it turns out this probably was a genuine out of memory error. While I was trying to figure out what was going on, I accidently ran the exact query from the pl/sql procedure.
         CURSOR date_components IS SELECT
         a.id,
         a.res_name ,
         a.yearcollected,
         a.monthcollected,
         a.daycollected,
         a.startyearcollected,
         a.startmonthcollected,
         a.startdaycollected,
         a.endyearcollected,
         a.endmonthcollected,
         a.enddaycollected
         FROM expandeddigircache a WHERE a.res_name=res_name           I was expecting 51 records, I got considerable more before the out of memory error occurred.
         I believe the query as written returns everything in the table. In this case 20mil+ records.
         The fundamental problem was that the parameter to the procedure was called res_name and the where clause tested a column called res_name. pl/sql did not consider them two different names. So I think the net result was a where clause of the form WHERE 'a'='a'
         When I changed the parameter name to p_res_name and the where clause to WHERE res_name=p_res_name the procedure worked as expected.

  • TypeError: Error #1009: Cannot access a property or method of a null object reference.

    Hi all,
    I am new to ActionScript and Flash, and I am getting this error: TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at jessicaclucas_fla::MainTimeline/stopResumescroll()
    I have several different clips in one movie that have scrolling content. When I click a button to move to a different clip that doesn’t have a certain scroll, it gives me this error. I cannot figure out how to fix this. You can see the site I am working on: http://www.jessicaclucas.com. I would really appreciate some help! Thank you in advance. Here is the code:
    //Import TweenMax and the plugin for the blur filter
    import gs.TweenMax;
    import gs.plugins.BlurFilterPlugin;
    //Save the content’s and mask’s height.
    //Assign your own content height here!!
    var RESUMECONTENT_HEIGHT:Number = 1500;
    var RESUME_HEIGHT:Number = 450;
    //We want to know what was the previous y coordinate of the content (for the animation)
    var oldResumeY:Number = myResumecontent.y;
    //Position the content on the top left corner of the mask
    myResumecontent.x = myResume.x;
    myResumecontent.y = myResume.y;
    //Set the mask to our content
    myResumecontent.mask = myResume;
    //Create a rectangle that will act as the Resumebounds to the scrollMC.
    //This way the scrollMC can only be dragged along the line.
    var Resumebounds:Rectangle = new Rectangle(resumescrollMC.x,resumescrollMC.y,0,450);
    //We want to know when the user is Resumescrolling
    var Resumescrolling:Boolean = false;
    //Listen when the user is holding the mouse down on the scrollMC
    resumescrollMC.addEventListener(MouseEvent.MOUSE_DOWN, startResumescroll);
    //Listen when the user releases the mouse button
    stage.addEventListener(MouseEvent.MOUSE_UP, stopResumescroll);
    //This function is called when the user is dragging the scrollMC
    function startResumescroll(e:Event):void {
    //Set Resumescrolling to true
    Resumescrolling = true;
    //Start dragging the scrollMC
    resumescrollMC.startDrag(false,Resumebounds);
    //This function is called when the user stops dragging the scrollMC
    function stopResumescroll(e:Event):void {
    //Set Resumescrolling to false
    Resumescrolling = false;
    //Stop the drag
    resumescrollMC.stopDrag();
    //Add ENTER_FRAME to animate the scroll
    addEventListener(Event.ENTER_FRAME, enterResumeHandler);
    //This function is called in each frame
    function enterResumeHandler(e:Event):void {
    //Check if we are Resumescrolling
    if (Resumescrolling == true) {
    //Calculate the distance how far the scrollMC is from the top
    var distance:Number = Math.round(resumescrollMC.y - Resumebounds.y);
    //Calculate the percentage of the distance from the line height.
    //So when the scrollMC is on top, percentage is 0 and when its
    //at the bottom the percentage is 1.
    var percentage:Number = distance / RESUME_HEIGHT;
    //Save the old y coordinate
    oldResumeY = myResumecontent.y;
    //Calculate a new y target coordinate for the content.
    //We subtract the mask’s height from the contentHeight.
    //Otherwise the content would move too far up when we scroll down.
    //Remove the subraction to see for yourself!
    var targetY:Number = -((RESUMECONTENT_HEIGHT - RESUME_HEIGHT) * percentage) + myResume.y;
    //We only want to animate the scroll if the old y is different from the new y.
    //In our movie we animate the scroll if the difference is bigger than 5 pixels.
    if (Math.abs(oldResumeY - targetY) > 5) {
    //Tween the content to the new location.
    //Call the function ResumetweenFinished() when the tween is complete.
    TweenMax.to(myResumecontent, 0.3, {y: targetY, blurFilter:{blurX:22, blurY:22}, onComplete: ResumetweenFinished});
    //This function is called when the tween is finished
    function ResumetweenFinished():void {
    //Tween the content back to “normal” (= remove blur)
    TweenMax.to(myResumecontent, 0.3, {blurFilter:{blurX:0, blurY:0}});

    Hi again,
    Thank you for helping. I really appreciate it! Would it be easier to say, if resumescrollMC exists, then execute these functions? I was not able to figure out the null statement from your post. Here is what I am trying (though I am not sure it is possible). I declared the var resumescrollMC, and then I tried to put pretty much the entire code into an if (resumescrollMC == true) since this code only needs to be completed when resumescrollMC is on the stage. It is not working the way I have tried, but I am assuming I am setting up the code incorrectly. Or, an if statement is not supposed to be issued to an object:
    //Import TweenMax and the plugin for the blur filter
    import gs.TweenMax2;
    import gs.plugins.BlurFilterPlugin2;
    //Save the content's and mask's height.
    //Assign your own content height here!!
    var RESUMECONTENT_HEIGHT:Number = 1500;
    var RESUME_HEIGHT:Number = 450;
    var resumescrollMC:MovieClip;
    if (resumescrollMC == true) {
    //We want to know what was the previous y coordinate of the content (for the animation)
    var oldResumeY:Number = myResumecontent.y;
    //Position the content on the top left corner of the mask
    myResumecontent.x = myResume.x;
    myResumecontent.y = myResume.y;
    //Set the mask to our content
    myResumecontent.mask = myResume;
    //Create a rectangle that will act as the Resumebounds to the scrollMC.
    //This way the scrollMC can only be dragged along the line.
    var Resumebounds:Rectangle = new Rectangle(resumescrollMC.x,resumescrollMC.y,0,450);
    //We want to know when the user is Resumescrolling
    var Resumescrolling:Boolean = false;
    //Listen when the user is holding the mouse down on the scrollMC
    resumescrollMC.addEventListener(MouseEvent.MOUSE_DOWN, startResumescroll);
    //Listen when the user releases the mouse button
    stage.addEventListener(MouseEvent.MOUSE_UP, stopResumescroll);
    //This function is called when the user is dragging the scrollMC
    function startResumescroll(e:Event):void {
    //Set Resumescrolling to true
    Resumescrolling = true;
    //Start dragging the scrollMC
    resumescrollMC.startDrag(false,Resumebounds);
    //This function is called when the user stops dragging the scrollMC
    function stopResumescroll(e:Event):void {
    //Set Resumescrolling to false
    Resumescrolling = false;
    //Stop the drag
    resumescrollMC.stopDrag();
    //Add ENTER_FRAME to animate the scroll
    addEventListener(Event.ENTER_FRAME, enterResumeHandler);
    //This function is called in each frame
    function enterResumeHandler(e:Event):void {
    //Check if we are Resumescrolling
    if (Resumescrolling == true) {
    //Calculate the distance how far the scrollMC is from the top
    var distance:Number = Math.round(resumescrollMC.y - Resumebounds.y);
    //Calculate the percentage of the distance from the line height.
    //So when the scrollMC is on top, percentage is 0 and when its
    //at the bottom the percentage is 1.
    var percentage:Number = distance / RESUME_HEIGHT;
    //Save the old y coordinate
    oldResumeY = myResumecontent.y;
    //Calculate a new y target coordinate for the content.
    //We subtract the mask's height from the contentHeight.
    //Otherwise the content would move too far up when we scroll down.
    //Remove the subraction to see for yourself!
    var targetY:Number = -((RESUMECONTENT_HEIGHT - RESUME_HEIGHT) * percentage) + myResume.y;
    //We only want to animate the scroll if the old y is different from the new y.
    //In our movie we animate the scroll if the difference is bigger than 5 pixels.
    if (Math.abs(oldResumeY - targetY) > 5) {
    //Tween the content to the new location.
    //Call the function ResumetweenFinished() when the tween is complete.
    TweenMax.to(myResumecontent, 0.3, {y: targetY, blurFilter:{blurX:22, blurY:22}, onComplete: ResumetweenFinished});
    //This function is called when the tween is finished
    function ResumetweenFinished():void {
    //Tween the content back to "normal" (= remove blur)
    TweenMax.to(myResumecontent, 0.3, {blurFilter:{blurX:0, blurY:0}});

  • Error#1009. Actionscript error in Flash Game I'm making...

    Hi,
    I'm making a Flash game and rather than putting all the AS3 on a seperate .as file, I'm throwing it on the timeline, which may or may not be a mistake since this game is getting really big, really fast and messy.
    And so I'm getting this error when I test:
    TypeError: Error #1009: Cannot access a property or method of a null object reference at GameBeta_MainTimeline_fla::MainTimeline/frame1()
    From what I've read on this error, it refers to something that isn't instantiated yet, like something that's out of order? Like I'm referring to something that doesn't exist at the point in time that I'm referring to it? So I'm looking at my AS3 and have NO idea. Here is what I have written:
    stop();
    //TITLE PAGE
    play_game.addEventListener(MouseEvent.CLICK, startgame)
    function startgame(evt:MouseEvent):void
        gotoAndStop("Name Input");
    //Name and Gender input page
    var userName:String;
    inputField.addEventListener(Event.CHANGE, onInput)
    function onInput(e:Event):void
         outputField.text = "So your name is " + inputField.text + " are you sure?";
         userName = inputField.text;
    confirm_input.addEventListener(MouseEvent.CLICK, toCreationpg)
    function toCreationpg(evt:MouseEvent):void
        gotoAndStop("Fem Creation");
        outputField.text = "So your name is "+ userName;
    //Character Creation Page
    readytostart.addEventListener(MouseEvent.CLICK, firstscene_plz)
    function firstscene_plz(evt:MouseEvent):void
        gotoAndStop("Day03");
        outputField.text = "Let's make your character, "+ userName;
    So, any ideas as to why I'm getting this error?
    Before I had each page with it's own Actionscript and buttons inside their own movieclips on the timeline. That was getting confusing so I took everything out of the movieclips to place everything on one timeline and have one layer of Actionscript hoping to simplify things and find the problem easier. No luck. It's supposed to have a Title page and a button that goes to the 2nd page where you input your name, and while you type, it shows your name before you confirm by hitting another button that finally goes to the Character Creation page. When I test, I just get that Error#1009, it'll get to the 2nd page for the name input, but the text fields act wacky and the button to proceed isn't working. I'm hoping that when I find the source of this error, the rest will be fixed as well.
    Thanks in advance for any advice offered! I'll greatly appreciate it.

    Yeah, that's what makes me even more confused. I have a seperate file where I'm testing the name input mechanics alone, just using this piece of actionscript, one input box with an instance inputField and a dynamic box outputField, a button, instance enter_name, that confirms and repeats the input on the next page. And it works.
    inputField.addEventListener(Event.CHANGE, onInput)
    var userName:String;
    function onInput(e:Event):void
         outputField.text = "You typed " + inputField.text;
         userName = inputField.text;
    enter_name.addEventListener(MouseEvent.CLICK, onClick)
    function onClick(evt:MouseEvent):void
        gotoAndStop("frame two");
        outputField.text = "So your name is "+ userName;
    So I don't get the error with that seperate file so could it be that other things are conflicting with this? Perhaps the order in which I've written my actionscript or the way I've organized my frames? In my other file, it says it's the inputField Event Listener but it'll work when I take out all the other frames and script...

  • TypeError: Error #1009 - (Null reference error) With Flash.

    I am not an expert in flash, but i do work with AS and tweak Flash projects , though not having deep expertise in it. Currently i need to revamp a flash website done by one another guy, and the code base given to me, upon execution is throwing the following error.
    "--- TypeError: Error #1009: Cannot access a property or method of a null object reference. at NewSite_fla::MainTimeline/__setProp_ContactOutP1_ContactOut_Contents_0() at NewSite_fla::MainTimeline/frame1() --"
    The structure of the project is like, it has the different sections split into different movie clips. There is no single main timeline, but click actions on different areas of seperate movie clips will take them between one another. All the AS logic of event handling are written inline in FLA , no seperate Document class exists.
    Preloader Movie clip is the first one getting loaded. As i understood the error is getting thrown initially itself, and it is not happening due to any Action script logic written inline, because it is throwing error even before hitting the first inline AS code.
    I am not able to figure Out what exactly it causing the problem, or where to resolve it. I setup the stuff online, for reference if anybody want to take a look at it, and here is the link.You need to have flash debugger turned ON in your browser, if need to see the exception getting triggered.
    http://tinyurl.com/2alvlfx
    I really got stuck at this point. Any help will be great.I had not seen the particular solution i am looking for anywhere yet, though Error #1009 is common.

    Thanks, for putting effort in helping me. I debugged the movie.The line of code being shown is this >>
    if(__setPropDict[ContactOutP1]== undefined ||  ! ((int(__setPropDict[ContactOutP1]) >= 1 && int(__setPropDict[ContactOutP1]) <=5))){
          __setPropDict[ContactOutP1] = currentFrame;
         __setProp_ContactOutP1_ContactOut_Contents_0();
    And i think this third line of code is where the exception is being thrown. But as i understood, this code is not written by the developer. I had nto seen this code, anywhere in the actions. Hopefully this will give you hint about what is exactly causing the issue and what can be done to resolve it.

  • Error 1009 when accessing webservice elements

    I'm learning flex and Flash Builder 4.6 and doing a small example project.
    I've created a mobile app test using a web service. I got the web service to work, creating xml dataset. I can get the flex code to access the web service and read the file. That works so far. The code reads the whole xml file from the web service and presents it. What I don't quite see is how to read only the elements. When I specify the .LastResult.element.element I get Error #1009: Cannot access a property or method of a null object reference. during runtime.
    I can post the  webservice xml result if that helps. Thanks for any insights.
    Here's the code
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark"
            xmlns:mx="library://ns.adobe.com/flex/mx"
            creationComplete="view1_creationCompleteHandler(event)"
            xmlns:service1="services.service1.*"
            xmlns:uws_lookups="services.uws_lookups.*"
            title="HomeView">
        <fx:Script>
            <![CDATA[
                import mx.rpc.soap.WebService;
                import mx.collections.ArrayCollection;
                import mx.rpc.AsyncResponder;
                import mx.collections.XMLListCollection;
                import mx.events.FlexEvent;
                import mx.rpc.events.ResultEvent;       
                import spark.events.IndexChangeEvent;
                import spark.events.TextOperationEvent;
            ]]>
        </fx:Script>
        <fx:Declarations>
            <s:WebService
                id="SampleDBwebserviceCS"
                wsdl="http://localhost:57074/Service1.asmx?WSDL"
                showBusyCursor="true" 
                useProxy= "false"
                makeObjectsBindable="true">
                <s:operation  name="Getmember" resultFormat="xml">
                </s:operation>
            </s:WebService>
            <s:CallResponder id="GetmemberResult"/>
            <service1:Service1 id="service1"/>
        </fx:Declarations>
        <s:VGroup width="60%" height="60%" color="#10851E" fontFamily="Arial" fontSize="10"
                  fontWeight="normal" horizontalAlign="center" verticalAlign="middle">    
            <s:TextArea id="lblResult" x="2" y="0" width="188" height="234"
                        creationComplete="view1_creationCompleteHandler(event)"
                        text="{GetmemberResult.lastResult}"> 
            </s:TextArea>
            <!-- Returns the whole xml result - all fields  all xml definitions -->
            <!-- Want to return GetmemberResult.lastResult.Sales.FirstName -->
            <!-- however this causes a 1009 error on Sales-->
            <s:Button
                label="Get Data"
                click="SampleDBwebserviceCS.Getmember.send(); lblResult.text = SampleDBwebserviceCS.Getmember.lastResult"
                x="10"
                y="568">
            </s:Button>   
        </s:VGroup>
    </s:View>
    1009 error when I insert this property in the <s:Button   tag: 
    click="SampleDBwebserviceCS.Getmember.send(); lblResult.text = SampleDBwebserviceCS.Getmember.lastResult.Sales.FirstName"
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at views::SampleSQLHomeView/___SampleSQLHomeView_Button1_click()[C:\Users\phillip\Adobe Flash Builder 4.6\SampleSQL\src\views\SampleSQLHomeView.mxml:121]

    I'd have to see the xml to say what, but 1009 is what it says - a null reference has no properties, it is null.
    Try tracing out SampleWebServiceCS.GetMember and you'll quickly see where along your .element.element path you have an error.
    (BTW, I've not used s:Operation before, but is your syntax correct?)
    G

  • Error #1009 - the most stupid AS3 loader issue ever !!!

    Hi,
    (It's about AS3 / Flash CS4)
    As a developer I often have no controll what is the content of a movie being runtime-loaded. I must presume I have no control on it at all - movie clips are marketed and sold and the only thing expected is that they play nice. And they are supposed to be runtime-loaded by a simple "progress-bar" style loader.
    The loader movie itself is fine. Though it's not sort of these tricky "no timeline, document-class only" it used to do the job.
    The main code is as folllows:
    FRAME 2:
    var thisRequest:URLRequest = new URLRequest("movie.swf");
    var thisLoader:Loader = new Loader();
    var newContent:MovieClip;
    thisLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, doneLoading);
    function doneLoading(evt:Event):void{
        newContent = MovieClip(thisLoader.content);
            //stage.addChild(newContent); -- please notice I commented this line !!!
    FRAME 3:
    thisLoader.load(thisRequest);
    As you may see, it's nothing special - just regular loader stuff here...
    But the issue is that it throws errors just in case of some loaded SWFs.
    Another words - the content and structure of movie.swf impact the loader performance!
    Too often I notice this kind of error being thrown right after "thisLoader.load(thisRequest);" is execuded:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at movie_fla::MainTimeline/frame8()
    Right after - that means BEFORE adding loaded movie to the Stage childlist etc.
    I said - right after movie.swf is invoked by the "load" command !
    This is really rediculous!
    I do not expect this sort of behavior! I expect the loaded movie to be quiet unless explicitly added to stage with:
    stage.addChild(newContent);
    But in a contrary - it seems the loaded movie becomes somewhat active right after being loaded - even before being added to stage. And in some cases this prematured activity leads to hard-to-controll errors! Please notice the error is thrown despite line where loaded content is added to stage is commented!
    I said what I wanted to say - now dear Flash AS3 experts and mastahakas please - give me some advice what to do in this situation.
    I am really, really confused as I want to write clean, error-free code and I get run out of ideas how to deal with this nasty issue.
    Rgs,
    Ziggi

    Yeap,
    I found the solution:
    thisLoader.contentLoaderInfo.addEventListener(Event.INIT, initLoading);
    function initLoading(e:Event){
        newContent = MovieClip(thisLoader.content);
        newContent.stop();
    So, stopping the loaded movie in this handler do the job...
    Stupid anyway!

  • Error #1009 - stumped on what to do

    I need major help here. I have a script with a movieclip with a two buttons inside. These work so that it would look like it stayed pushed down until you clicked it again to simulate a multiple choice. Pressing the buttons sends the array a push. If the array reaches 4 it should stop and all that stuff. Problem is that it works pretty fine if you press it, but wont stay pressed anymore and drops me with the 1009 error.
    Anyways, here's the code:
    Any kind of help would be greatly appreciated as this is basically for my finals.

    Alright, I got the debugging on. It says:
    "TypeError: Error #1009: Cannot access a property or method of a null object reference.
      at MagiTest_fla::MainTimeline/frame1()[MagiTest_fla.MainTimeline::frame1:27]"
    frame1:27 is:
    magibatClip.magiDown.addEventListener(c, unTake);
    Most likely, it's the first mistake you pointed out (declared, but not instantiated). I read an older answer you gave to another user, and I speculated it is that, but I still don't understand that.
    It went something like this from what I read:
    var someMC:MovieClip = new MovieClip();
    But I still don't seem to get it to work as I don't really understand it. (Sorry for my uselessness).

  • Another TypeError: Error #1009 Problem

    Hey all,   I've searched the 'net and searched these forums but can't seem to figure out what I'm doing wrong.  I'm creating a flash based game for school that so far has ten frames on the timeline.  I have buttons on frame one, frame 5, and frame 10. I have actionscript code to control those buttons on frame 1, frame 5, and frame 10 respectively.  The code is worded identically on each frame with the exception that I've changed the button names and the function names that are called when the mouse button is pressed.   The code works fine on frame 1 and on frame 5, but when I click the button on frame 5 that sends me to frame 10, I get this error immediately:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at keys2BibleTest_fla::MainTimeline/frame10()
        at flash.display::MovieClip/gotoAndStop()
        at keys2BibleTest_fla::MainTimeline/stormBtnHandler1()
    I have verified that each instance of the buttons do indeed have the name of the button being listened for in the event handlers. I can change the type from button to movieclip and it works fine.  I can also remove frames 1 through 9 and the code works.
    Here's the code:
    Frame 1:
    stop();
    enterBtn.addEventListener(MouseEvent.MOUSE_DOWN, enterBtnHandler1);
    function enterBtnHandler1(event:MouseEvent):void {
        gotoAndStop(5, "Scene 1");
    Frame 5:
    import flash.events.MouseEvent;
    stormBtn.addEventListener(MouseEvent.MOUSE_DOWN, stormBtnHandler1);
    function stormBtnHandler1(event:MouseEvent):void {
        gotoAndStop(10, "Scene 1");
    chickenOutBtn.addEventListener(MouseEvent.MOUSE_DOWN, chickenOutBtnHandler1);
    function chickenOutBtnHandler1(event:MouseEvent):void {
        gotoAndStop(1, "Scene 1");
    Frame 10:
    import flash.events.MouseEvent;
    creationBtn.addEventListener(MouseEvent.MOUSE_DOWN, creation);
    function creation(event:MouseEvent):void {
        gotoAndStop(3, "Scene 1");
    lifeBtn.addEventListener(MouseEvent.MOUSE_DOWN, lifeOfChrist);
    function lifeOfChrist(event:MouseEvent):void {
        navigateToURL(new URLRequest("http://www.ceoutreach.org"));
    I can't for the life of me figure out what's wrong.  Can anyone help?
    Thank you,
    Mike

    Ned,
    thank you for your reply. Unfortunately, my buttons are on separate layers and separated by blank keyframes to boot.  When I posted originally, the buttons were all on the same layer BUT separated by blank keyframes. After doing some research on the web, I moved the buttons to their own separate layers (one button per layer) and kept the blank keyframes as well.
    Currently, my only filled keyframes are one, five, and ten. All other keyframes are blank except for my labels and actionscript code. I'm using separate layers for labels and actions, too. I attempted to attach the file with my original post but received the message that .fla files are not allowed.  I don't know about your window, but mine says Max size 5.0 MB (my file is 2), All files types allowed except.... .fla is not one of those in the exception list so I expected it to go.
    It's got something to do with the two buttons on frame 10.... I just went into the actionscript and bypassed frame 5, going directly to frame 10 when the Enter button is depressed, and got the same error message.   There's something in the code I'm just not seeing.... when I comment out the code for the buttons, no error message.  Put the code back in, error message comes back.  Delete the buttons and the code and insert new ones, the error message comes back.
    It's got me totally stumped.
    Thank you for trying,
    Mike
    Edit: I forgot to mention, frame ten is the only place on the timeline where instances of these particular buttons are being used. The other frames are populated with different buttons.  Also, when I change the type to movieclip, everything works.  Weird, huh?

Maybe you are looking for