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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:58:33+00:00 2026-05-30T17:58:33+00:00

I have an AS3 class on my Flex project: package system { import mx.managers.PopUpManager;

  • 0

I have an AS3 class on my Flex project:

package system
{
    import mx.managers.PopUpManager;

    import ui.Eula;

    public class Dialogs
    {
        public function Dialogs(){}

        public static function showEula():void {
            var eulaWindow:Eula = new Eula;
            PopUpManager.addPopUp(eulaWindow,MyMainMXML,true);
        }
    }
}

MyMainMXML is my base MXML file. It won’t let me reference to it via my class. How do I do that? The compiler error goes as follows:

1067: Implicit coercion of a value of type Class to an unrelated type flash.display:DisplayObject.

The main MXML file is a spark WindowedApplication so I assumed it’s part of the DisplayObjects.

EDIT:

I tried using FlexGlobals like the one below but it gives off an error that says 1118: Implicit coercion of a value with static type Object to a possibly unrelated type flash.display:DisplayObject.

package system
{
    import mx.core.FlexGlobals;
    import mx.managers.PopUpManager;

    import ui.Eula;

    public class Dialogs
    {
        public function Dialogs(){}

        public static function showEula():void {
            var eulaWindow:Eula = new Eula;
            PopUpManager.addPopUp(eulaWindow,FlexGlobals.topLevelApplication,true);
        }
    }
}
  • 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-30T17:58:34+00:00Added an answer on May 30, 2026 at 5:58 pm

    Using FlexGlobals.topLevelApplication returns you an object of type Object (yeah I know, that sounds redoundant :P). However addPopUp 2nd parameter if a DisplayObject. Hence, this should do the trick :

    PopUpManager.addPopUp(eulaWindow,FlexGlobals.topLevelApplication as DisplayObject,true);
    

    I’m not 100% sure about why FlexGlobals.topLevelApplication does not return a DisplayObject, might be a low-level issue.

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

Sidebar

Related Questions

I have an AS3 Singleton: package { public class Singleton { public function Singleton(enforcer:SingletonEnforcer):void
I have as3 class like this package { import Global; import flash.display.MovieClip; import flash.events.*;
In AS3, if I have a class such: public class dude { //default value
I have an AS3 App class e.g (pseudo code) public class MyApp extends Application
I'm using an AS3 class that is: package { public class PeopleInfo { public
I have flex sdk 4.6 installed and I want to compile AS3 class that
in AS3, I have an external class ImageLoader, that loads an image upon request.
In AS3 you have a function on a string with this signature: function replace(pattern:*,
I'm new to AS3 and have been working on an XML driven navigation system
I'm working on a large-size dual AS3/Flex project (some parts are pure AS3, other

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.