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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:07:45+00:00 2026-05-16T07:07:45+00:00

I want a way to pass a string statement from one base class to

  • 0

I want a way to pass a string statement from one base class to an other.
The two classes are CLICK and READ. What’s an easy way to do this? I haven’t
worked in classes that often to know some of the simple tricks. I appreaciate your help.
Thanks,

Class: CLICK
Base Class: ClickClass
Object I’ve turned in to a base class and placed in the same FLA

package {
    import flash.events.Event;
    import flash.display.MovieClip;
    import flash.text.TextField;
    import flash.events.MouseEvent;
    import flash.display.*;

    public class ClickClass extends MovieClip {
         //public var read:String = "It's Done!";
         public function ClickClass() {
            b.addEventListener(MouseEvent.CLICK, onClick);
         }
            public function onClick(event:MouseEvent){
            trace("test!");
            //t.text = String(read);
            //ReadClass.t.text = String(read);


         } 
    }  
}

Class: READ
Base Class: ReadClass
Object I’ve turned in to a base class and placed in the same FLA

package {
    import flash.events.Event;
    import flash.display.MovieClip;
    import flash.text.TextField;
    import flash.events.MouseEvent;
    import flash.display.*;

    public class ReadClass extends MovieClip {
         public var read:String = "It's Done!";
         public function ReadClass() {
             //t.text = String(read);

             /*
             1119: Access of possibly undefined property
             read through a reference with static type Class.
             */

         }

            //public functions
    }  
}

ERRORS: ‘talk to a DynamicTextField in an other class’

1119: Access of possibly undefined property read through a reference with static type Class.

1120: Access of undefined property read.‘previous error’

ERROR: ‘Attaching scripts to document class’
5006: An ActionScript file can not have more than one externally visible definition

  • 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-16T07:07:46+00:00Added an answer on May 16, 2026 at 7:07 am

    I am not quite sure if I completely got your question, but you could of course make »read« a static member of ClickClass (probably a const) and access it via ReadClass.read…

    A cleaner solution would probably be to create a third class, maybe called UiStrings which enumerates all the strings needed in the user interface:

    public class UiStrings {
        public static const DONE :String = "It's done";
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want two objects to share a single string object. How do I pass
So, I got two objects, a and b. Now, I want to pass one
I.e. I only want a nice way to retrieve existing objects from my Model
I have to pass a string to a form. I want to use a
I want a way to pass some literal text to Vim. I've seen that
I want to append query string parameters to URLs generated from Rails 3 ActionMailer
I've created two classes in business layer. the first one is called Users with
I know the only way to pass a string literal as template argument is
I want to pass a string array (separated by commas), then use a function
So I want a way to set up events so that I can pass

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.