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

  • Home
  • SEARCH
  • 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 988483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:38:35+00:00 2026-05-16T05:38:35+00:00

My following code gave me TypeError: Error #2007: Parameter child must be non-null runtime

  • 0

My following code gave me
TypeError: Error #2007: Parameter child must be non-null runtime error.
not sure why…I would appreciate any help…

        mySb = new ScrollBar(); 
        mySb.x = cont.x; //+ cont.width;
        mySb.y = cont.y;
        mySb.height = contMask.height;
        mySb.enabled = true;
        addChild(mySb); 

Updated

package com.search.view

{

import com.search.events.YouTubeSearchEvent;

import fl.controls.ScrollBar;
import fl.controls.Slider;
import fl.controls.UIScrollBar;
import fl.events.ScrollEvent;
import fl.events.SliderEvent;

import flash.display.Shape;
import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.geom.Rectangle;
import flash.net.URLLoader;

public class SearchResultContainer extends Sprite
{
    private var cont:videoCont;
    private var contMask:Sprite;
    private var mySb:ScrollBar;


    public function SearchResultContainer()
    {
        super();

        }
    public function get selectedVideoID():String{
        return newVideoID;
    } 

    public function createContainer(_x:Number,_y:Number, videoResult:Array):void{



    cont=new videoCont();
    cont.x=_x;
    cont.y=_y;
    addChild(cont);

    contMask = new Sprite();
    contMask.x = cont.x;
    contMask.y = cont.y;
    createMask(contMask,0x000000,452,88);

    addChild(contMask);     
    cont.mask = contMask;


    mySb = new ScrollBar(); 
            mySb.x = cont.x; //+ cont.width;
            mySb.y = cont.y;
            mySb.height = contMask.height;
            mySb.enabled = true;
            addChild(mySb); //problem code here...




    }


    private function createMask(inSrc:*,inColor:Number=0x999999,inW:Number=80,inH:Number=50):void{
        var rect:Shape=new Shape();
        rect.graphics.clear();
        rect.graphics.beginFill(inColor);
        rect.graphics.drawRect(0,0,inW,inH);
        rect.graphics.endFill();
        inSrc.addChild(rect);
    }



}

}

I am in Flex environment….

  • 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-16T05:38:36+00:00Added an answer on May 16, 2026 at 5:38 am

    Try to add a breakpoint before the problem occurs and check the mySb value , it looks like it’s probably null , if it’s not you’ll have to look for null values either in the DisplayObjects you’re using or the properties you’re assigning them… if it is null , maybe you need to set more properties to your ScrollBar instance before adding it to the display list…

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

Sidebar

Related Questions

I tried following code but it gave null reference error for second line. I
The following code gave a warning of Sending 'ViewController *const __strong' to parameter of
I tried to modify a type using the following code and it gave me
I was experimenting with regexps last day and the following code gave me quite
Why is the following code NOT working without id or name attribute specified for
If I run the following code from a terminal, I get a helpful error
I Get Error when i use the following code str = Insert into BasicData
My friend gave the following code which is working awesome here http://jsfiddle.net/WVLE2/ I tried
Consider the following code: time_t t; t = time( NULL ); elog << timezone:
I'm getting a very strange error with preg_replace. I'm using the following code: $text=preg_replace('/(\s)?'.preg_quote($f).'(\s)?/','<a

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.