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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:54:24+00:00 2026-06-03T23:54:24+00:00

Using Adobe Flash Professional CS6, AS3 Please let me know if I need to

  • 0

Using Adobe Flash Professional CS6, AS3
Please let me know if I need to provide any more info
I am trying to set up a navigation menu and my question is, “How do I get a MovieClip to call a function in my Main.as file from the Stage?” There is only one frame (I do not want more) and the different menu screens, which are just MovieClips, are added to the stage with AS when needed. I have a public function in the file Main.as called _About(), that my MovieClip, “MenuScreen”, cannot access. I can successfully have _Menu() add a MovieClip to the stage with eventListeners, but when the mc makes the call back to change screens I get this error:

TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::Stage@51ca0d1 to flash.display.MovieClip. at MenuScreen/clickAbout()[MenuScreen::frame1:32]

Frame1:32’s code is:

MovieClip(parent)._About();

Line 51 in my Main.as is:

public function _About():void
{
trace("The About Function");
}

Below I have detailed more about Main.as with most of the fat trimmed.

package 
{
import stuff

public class Main extends MovieClip
{
    //Load the screen MCs onto the stage
    public var _menu:MenuScreen = new MenuScreen();
    public var _about:AboutScreen = new AboutScreen();
    public var isMenu:Boolean = true;
    public var isAbout:Boolean = false;

    public function Main()
    {
        _Menu();            
    }

    public function _Menu():void
    {
        isMenu = true;
        stage.addChild(_menu);
    }

    public function _About():void
    {
        trace("The About Function");
    }
  • 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-03T23:54:26+00:00Added an answer on June 3, 2026 at 11:54 pm

    Set static property :

    public static var instance:Main;
    public function Main(){
            instance = this;
            _Menu();            
        }
    

    and then from anywhere You can use code :

    Main.instance._About();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ii am trying to find the ip addres by using as3 in adobe Flash
I'm using Adobe Flash CS 4 and would like to know are there any
I'm trying to build an Adobe Air app not using Flash but HTML5. I
I am using Adobe Flash CS4. I don't know why I do the sample
I'm using adobe's example.swf to provide inline flash upgrades for users. However, if the
I create an augmented reality application on android using the Adobe Flash Professional CS5
I'm an absolute beginner at flash so please bear with me. I'm using Adobe
I run the following code using Adobe Flash Professional CS5.5, Flash Player 11.2.202.235, ActionScript
I have Adobe Media Server 4, and I am using Flash Professional CS5.5 to
i tried to developed iphone application using adobe flash professional cs5 in windows so

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.