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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:49:38+00:00 2026-05-23T11:49:38+00:00

How do I access the methods of a dynamically created movieclip/object? For simplicity sake

  • 0

How do I access the methods of a dynamically created movieclip/object?

For simplicity sake I didn’t post code on how I dynamically created the movieclip. Instead, assume its already created. It is an object. It is called field_2. Below it is referenced by using getChildByName(‘field_’ + field.id);

Check_box_component.as

public var testVar:String = 'test';   

public function testReturn()
{
    return 'value returned';
}

Main.as

var temp:MovieClip = MovieClip(getChildByName('field_' + field.id));
trace(temp);
trace(temp.testReturn);
trace(temp.testVar);

Output:

[object Check_box_component]
function Function() {}
test

When I trace temp.testReturn, why does it show “function Function() {}” instead of “value returned“?

This link below helped me get this to this point.

http://curtismorley.com/2007/06/13/flash-cs3-flex-2-as3-error-1119/

  • 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-23T11:49:38+00:00Added an answer on May 23, 2026 at 11:49 am

    have you tried:
    trace(temp.testReturn());
    … instead of your
    trace(temp.testReturn);
    … ?

    I think you will have the result you are waiting for.

    Actually, when doing “temp.testReturn”, you are not calling the function. You need to add the parenthesis to make the actual call.

    When you make a trace of temp.testReturn, the function is not executed: the trace function tell you the type of temp.testReturn, which is here correctly returned as a “function” type.

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

Sidebar

Related Questions

I want to access the Symfony2 entity methods dynamically by calling it's object. For
I have a web application that will need to access code behind methods as
I have dynamically created TValueListEditor VCL component on a TForm . The code is
I recently wrote some data access methods (plain old Java) that use immutable objects
How is it that Ruby allows a class access methods outside of the class
I need to access RMI methods from a client front end. For different reasons,
I am trying to use Python's ctypes library to access some methods in the
QUESTION : In .NET 3.5 WinForms apps, how do I access/call methods in UI
I have certain PHP class methods that access external variables. These variables are not
I want a grails service to be able to access Domain static methods, for

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.