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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:41:30+00:00 2026-05-12T18:41:30+00:00

I’ve the following code in my displayandmove.as file: package { import flash.display.MovieClip; public class

  • 0

I’ve the following code in my displayandmove.as file:

package {

    import flash.display.MovieClip;

    public class FigureConstruct extends MovieClip {

        public function displayandmove() {
            this.height = stage.stageHeight/5;
            this.width = stage.stageWidth/5;
        }

    }

}

And I have the following on frame 1 of my displayandmove.fla:

var figure:FigureConstruct = new FigureConstruct();
stage.addChild(figure);
figure.x = stage.stageWidth/2;
figure.y = stage.stageHeight/2;

These files are in the same directory. In my FLA library I have my figure MovieClip and it ha a Class of “FigureConstruct” and base class of “flash.display.MovieClip”.

Currently the code above works fine because I figured out that if I execute the object size code as a construct — using the file name as the function name — it works.

What I originally intended to do was to have my function named “sizeFigure()” in my AS file and then call “figure.sizeFigure();” after “stage.addChild(figure);” on frame 1 of my FLA.

This output

Error #1006: value is not a function.

Can anyone explain what I am missing to get this to execute as a function rather than as a constructor?

I thought maybe I am goofing up when I set my Class and Base Class pointers for the library object… but not sure.

PS – Sorry if I am misusing terms, still nailing those down as I go.

Edit: Below is the original code that does not seem to work until after I changed the name of my function to the name of the file, making it the class constructor. The above version works, below does not.

displayandmove.as

package {

    import flash.display.MovieClip;

    public class FigureConstruct extends MovieClip {

        public function sizeFigure() {
            this.height = stage.stageHeight/5;
            this.width = stage.stageWidth/5;
        }

    }

}

displayandmove.fla:

var figure:FigureConstruct = new FigureConstruct();
stage.addChild(figure);
figure.sizeFigure();
figure.x = stage.stageWidth/2;
figure.y = stage.stageHeight/2;
  • 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-12T18:41:31+00:00Added an answer on May 12, 2026 at 6:41 pm

    Error #1006: value is not a function

    This error is occurring somewhere else in your code. Does that class have a property (function get/set) by the name value? And are you trying to access it as a function? Check your code for value() and replace it with value.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
In my XML file chapters tag has more chapter tag.i need to display chapters
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
i want to parse a xhtml file and display in UITableView. what is the
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I have this code to decode numeric html entities to the UTF8 equivalent character.

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.