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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T00:27:53+00:00 2026-05-30T00:27:53+00:00

I´m trying to initialize a class, based on a concatenation of a string and

  • 0

I´m trying to initialize a class, based on a concatenation of a string and a number.
All my classes are public.

This is my code:

public function setCurrentPath(pathNumber:String)
    {
        var pth_class:Class = getDefinitionByName('Pth'+pathNumber) as Class;
        var pth:MovieClip = new pth_class();
        addChild(pth)
        pth.getXY();


    }

So I´m getting Error #1065.

Any help?

Yes I have up on my class file import flash.utils.*

  • 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-30T00:27:55+00:00Added an answer on May 30, 2026 at 12:27 am

    Is your pth_class variable null?

    If so, there are a couple of reasons this might be the case:

    1) You haven’t input the correct fully qualified class name of your class. E.g com.myClasses.Pth1

    or

    2)

    If you’re instanciating classes dynamically like this and there is no other “regular” reference to the class (such as blah = new Pth1()) then the “Pth1” class won’t be included in the compilation process.

    To get around this I think you can supply arguments to the compiler to force it to compile those classes OR you can manually include references to them in your existing code:

    p1:Pth1;
    p2:Pth2;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to initialize string with iterators and something like this works: ifstream fin(tmp.txt);
how to initialize a private static member of a class in java. trying the
I have a list string tag. I am trying to initialize a dictionary with
I'm trying to figure out how to dynamically create methods class MyClass def initialize(dynamic_methods)
I'm trying to initialize and instance variable as an array as follows: class Arch
This is the bit of code, it's a base class for my controller that
I am trying to initialize a class variable as a hash when I create
I have the following code: class Engine attr_accessor :isRunning def initialize @isRunning = false
I'm trying to enforce an inheritor of an abstract class to initialize one of
I was trying to work with the codeigniter pagination class. Here is my code

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.