Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 695559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:58:19+00:00 2026-05-14T02:58:19+00:00

I am trying to run a function of the main class, but even with

  • 0

I am trying to run a function of the main class, but even with casting it does not work. I get this error

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at rpflash.communication::RPXMLReader/updateplaylist()
at rpflash.communication::RPXMLReader/dataHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::XMLSocket/scanAndSendEvent()

this is the main class code

package{
import flash.display.MovieClip;
import rpflash.communication.RPXMLReader;

public class Main extends MovieClip{

    var reader:RPXMLReader = new RPXMLReader(); 

    public function Main(){
        trace('Main actionscript loaded');

        }

    public function test(){
        trace('test worked');}

}
}

and this is the function trying to call it:

private function updateplaylist(){
        //xml to string
        var xmls:String= xml.toXMLString();
        trace('playlist updated debug point');
        MovieClip(this.parent).test();}

what am i doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T02:58:20+00:00Added an answer on May 14, 2026 at 2:58 am

    It looks like your RPXMLReader doesn’t have a parent… assuming RPXMLReader extends MovieClip (or Sprite, or DisplayObject etc), you need to add it as a child of your Main class – otherwise its parent property will be null:

    public class Main extends MovieClip{
         var reader:RPXMLReader = new RPXMLReader(); 
    
        public function Main(){
            addChild(reader);
        }...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to get my Chrome Extension to run the function init() whenever
Trying to use CIColorMap filter, but getting run-time error [NSImage _feImage]: unrecognized selector sent
i am trying to run commands using java program,but p.waitfor() function waits forever.What is
I am trying to run the following C function from Java using JNA, but
trying to run a function without putting it in the Main() when the program
I'm trying to run a function that is located within a .ps1 file. The
I'm trying to run a function called makeHighlight within my constructor SmartButton. makeHighlight is
I'm trying to run the Count() function of a Linq statement in an overriden
I am trying to run a map/reduce function in mongodb where I group by
I'm trying to run the code from here MDN: Generators and Iterators function fib()

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.