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 630075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:48:59+00:00 2026-05-13T19:48:59+00:00

Hey everyone, not sure what is going on here :( Basically I have a

  • 0

Hey everyone, not sure what is going on here 🙁

Basically I have a function that is needs to tell 2 other classes to do something. It works for one of the classes: BigPlayButton, but not Background for some reason.

TabMenu.as Class function

Note: The function below WILL call the hitPlayCircle function in my BigPlayButton class, but I get an undefined property error for the Background switchTitle function.

private function thumbClick(e:MouseEvent = null):void
    {
        trace("YOU CLICKED THUMBNAIL: " + e.target.id);
        trace("PLAY THIS VIDEO: " + tabData[tabID].video[e.target.id].@flv);
        trace("THE VIDEO TITLE: " + tabData[tabID].video[e.target.id].@title);

        newTitle = tabData[tabID].video[e.target.id].@title;
        Background.instance.switchTitle(newTitle);

        BigPlayButton.instance.playState = false;
        BigPlayButton.instance.hitPlayCircle(); // Hide the big play button

        vdp.setflvSource(tabData[tabID].video[e.target.id].@flv);
        vdp.playNewVideo(tabData[tabID].video[e.target.id].@flv);
    }

I’ve imported both classes so not sure what’s going on 🙁
I did correctly set my static var instance variables.

public static var instance:Background; //<- in Background Class

public static var instance:BigPlayButton; // <- in BigPlayButton Class

And I have instance = this; in Both Classes as well…

The function inside my Background Class I’m trying to call from my TabMenu Class:

public function switchTitle(sentText):void
    {
        titleString = sentText;
        vTitle.text = titleString;
    }

Error Message (I always seem to get this error)

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at ui::TabMenu/thumbClick()
  • 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-13T19:48:59+00:00Added an answer on May 13, 2026 at 7:48 pm

    I would guess that Background.instance is not instantiated at the point this function is called.

    Try tracing the value of Background.instance.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey everyone, I'm working on a PHP application that needs to parse a .tpl
Hey everyone. I am working on an app that displays a modal the first
Hey everyone, I made sure there wasn't a similar discussion before posting but forgive
Hey everyone, I wasn't really sure how to describe this in the form of
Possible Duplicate: Why does simple C code receive segmentation fault? Hey Everyone, I'm sure
Hey everyone, I have achieved the effect described in the title using the following
Hey everyone, I'm using Virtual PC and working with a virtual hard disk (*.vhd)
Hey everyone, I am trying to run the following program, but am getting a
Hey everyone. I'm trying to make a swing GUI with a button and a
Hey peoples, I've been studying Java for a couple of weeks, and have decided

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.