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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:03:19+00:00 2026-05-15T08:03:19+00:00

I have a library object ( SomethingMC ) which extends a custom class (

  • 0

I have a library object (SomethingMC) which extends a custom class (Something). Something, in turn, extends MovieClip.

If adding SomethingMC to the stage within Flash CS3 IDE, is it possible for it’s super class (Something) to assign an instance name from a class constant (Something.THE_CONSTANT)?

package
{
  import flash.display.MovieClip;
  import flash.events.Event;

  public class Something extends MovieClip
  {
    public static const THE_CONSTANT:String = 'anInsanceName';

    public function Something():void
    {
      addEventListener(Event.ADDED_TO_STAGE, assignInstanceName);
    }

    protected function assignInstanceName(event:Event):void
    {
      this.name = THE_CONSTANT;
    }
  }
}

The above does not work. It throws Error #2078: The name property of a Timeline-placed object cannot be modified. if the instance is assigned a name in the IDE, and it just doesn’t work if no name is assigned in the IDE.

I’m afraid the answer is no…

  • 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-15T08:03:19+00:00Added an answer on May 15, 2026 at 8:03 am

    I don’t think this is possible, but I like the idea. It would certainly be nice to be able to do this rather than having to name each key-framed instance of a DisplayObject you wish to target via it’s instance name.

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

Sidebar

Related Questions

Lets say we have a movieclip Enemy in the Flash library and a class
I have existing Linux shared object file (shared library) which has been stripped. I
I have a library which creates objects (instances of class A) and pass them
I have a library (django-piston) which is expecting some parameters of the class as
Within a class library I'm writing I have a method allowing the library to
I have a need to create a library of Object Oriented PHP code that
I am writing a fairly large C++ shared-object library, and have run into a
I have a COM object written using the MS ATL library. I have declared
I have an upgraded 3rd party library and there used to be an object
Does anyone have an example using the table object in YUI library. More specifically,

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.