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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:19:11+00:00 2026-06-01T17:19:11+00:00

I am new to AS3. For graphical representation I use fla file as a

  • 0

I am new to AS3.

For graphical representation I use fla file as a resource. I work in Flash Builder 4.6 to code.

I try to create own class Panel which contains the click event.
But event doesn’t work when I test the move!

When I move the event handler (buttonClick) and event listener to main class (test) and apply the event to the card object (for example), all works fine.

What is wrong with my code?

My main class of application:

package
{
import flash.display.Sprite;
import flash.events.*;
import flash.ui.Keyboard;

import ui.Panel;

public class test extends Sprite
{
    var card:Panel;

    public function test()
    {
        card = new Panel();
        addChild(card);
    }

}
}

The Panel class:

package ui
{
import flash.display.MovieClip;
import flash.events.*;

public class Panel extends MovieClip
{

    var back:PanelBack;
    var button:PanelButton;

    public function Panel()
    {
        super();
        back = new PanelBack();
        button = new PanelButton();
        addChild(back);
        addChild(button);

        button.addEventListener(MouseEvent.CLICK,buttonClick);
    }

    private function buttonClick(event:MouseEvent):void
    {
        trace("Hello");
    }

}
}
  • 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-06-01T17:19:12+00:00Added an answer on June 1, 2026 at 5:19 pm

    enter image description here

    Ensure that in the symbol properties, you have your settings configured as shown above. In the "class" section you must explicitly define the class (defined in an external .as file) to link the symbol to the class within the file. Also ensure that in your project directory (where your FLA is) you have a folder named "ui" with a "Panel.as" file where your panel class is defined therein.

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

Sidebar

Related Questions

When I attempt to create a new flash list component from my as3 file
Make a new AS3 Document in Flash, paste in the following code and run
New AS3/Flash Builder user here. I'm debugging an AS3 project using Flash Builder 4.5,
I am new to Flash and AS3. I have a DataGrid like this Item
I am new to AS3. I was reading a piece of code on the
Obviously I'm new to as3...Can someone please explain to me how I can use
I'm new to AS3 and have been putting my code on the timeline and
I am new to AS3. When learning AS3, I get the below code from
I'm trying to use the new(ish) AS3 global error handling class. I am trying
Let's say I have some code like this in AS3 for(...) thing = new

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.