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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:08:20+00:00 2026-05-13T10:08:20+00:00

I have 2 classes with a draw function in them, my Background class and

  • 0

I have 2 classes with a draw function in them, my Background class and VideoDisplay class. I’m not done with the VideoDisplay class, but I put simple traces in it to test. I call both the Background and VideoDisplay the same way in my document class, but when I try to call the draw function of the VideoDisplay class I get this error:

Error #1006: draw is not a function.

My Document class code:

        //this is inside of onBulkLoadComplete which is called from init
        drawBackground();
        drawVideo();
    }

    private function drawBackground():void
    {
        trace("\r"+"drawBackground(); ---------- called");

        bg = new Background();
        bg.draw(globalWidth, globalHeight, firstTitle);
        stage.addChild(bg);
    }

    private function drawVideo():void
    {
        trace("\r"+"drawVideo(); ---------- called");

        vd = new VideoDisplay();
        vd.draw(globalWidth, globalHeight, videoName); //<-- problem
        stage.addChild(vd);
    }

Basically the code above is the same! So I dunno why on the vd.draw line I’m getting that #1006 error

The code for the draw function in my VideoDisplay class:

public function draw(w, h, flvUrl):void
    {           
        sizeW = w;
        sizeH = h;
        flvSource = flvUrl;

        trace("VideoDisplay.sizeW     = "+sizeW);
        trace("VideoDisplay.sizeH     = "+sizeh);
        trace("VideoDisplay.flvSource = "+flvSource);

        backing.graphics.beginFill(bgColor);
        backing.graphics.lineStyle(borderSize, borderColor);
        backing.graphics.drawRoundRect(position, position, sizeW-9, sizeH-9, cornerRadius);
        backing.graphics.endFill();
    }

The full output window trace/error message:

drawBackground(); ---------- called
Background.sizeW = 520
Background.sizeH = 510
Background.mainTitle = Video Title

drawVideo(); ---------- called
TypeError: Error #1006: draw is not a function.
at com.leongaban.TEN::TEN/drawVideo()
at com.leongaban.TEN::TEN/onBulkLoadComplete()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at br.com.stimuli.loading::BulkLoader/_onAllLoaded()
at br.com.stimuli.loading::BulkLoader/_onItemComplete()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at br.com.stimuli.loading.loadingtypes::LoadingItem/onCompleteHandler()
at br.com.stimuli.loading.loadingtypes::XMLItem/onCompleteHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()
  • 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-13T10:08:20+00:00Added an answer on May 13, 2026 at 10:08 am

    If you’re using Flex (or maybe even if you’re not), your VideoDisplay class might be ambiguous with this one. Try renaming it or aliasing your import statements.

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

Sidebar

Ask A Question

Stats

  • Questions 343k
  • Answers 343k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I would read the android's source code. Check this repo.… May 14, 2026 at 5:21 am
  • Editorial Team
    Editorial Team added an answer Use strtol instead. May 14, 2026 at 5:21 am
  • Editorial Team
    Editorial Team added an answer If someone is still interested in this, I figured out… May 14, 2026 at 5:21 am

Related Questions

I've got a situation where I need to resize a large number of images.
I find myself defining classes like: struct AngleSize { explicit AngleSize(double radians) : size(radians)
I'm having problem with listening to an event dispatched from a child class, and
I have already read various accounts of Clojure vs. Scala and while I realize
I am currently trying to create a menu system for a game and cannot

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.