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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:34:17+00:00 2026-05-26T01:34:17+00:00

Afraid that I may be over-thinking this and also do not know which keywords

  • 0

Afraid that I may be over-thinking this and also do not know which keywords I should be using to find more information. Needless to say my searches are proving futile. I would like to know if there is a reason that, within an AS3 class, I would want to do something like this:

var myStageInstance:Stage;

//within an arbitrary class
var myStageInstance:Stage = stage;
myStageInstance.addEventListener(MouseEvent, someFunction);

as opposed to something that I would normally do:

//within an arbitrary class
stage.addEventListener(MouseEvent, someFunction);

There is no particular problem that I am looking to solve right now. I would just like to know if there is a reason to use one method over the other.

  • 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-26T01:34:17+00:00Added an answer on May 26, 2026 at 1:34 am

    the follow code will not work it is broken as myStageInstance is null until you assign it something.

    var myStageInstance:Stage;
    //within an arbitrary class
    myStageInstance.addEventListener(MouseEvent, someFunction);
    
    //You need to do 
    var myStageInstance:Stage = stage;
    myStageInstance.addEventListener(MouseEvent, someFunction);
    
    //this is more preferred as it is a lot less code. 
    stage.addEventListener(MouseEvent, someFunction);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm afraid I know the answer to this but I'll ask on the longshot
We currently use VSS 6, this is not going to change I am afraid.
I may not be asking this in the best way possible but i will
I'm afraid that this one is a little tricky since I couldn't recreate the
I want so send every week an update by email. But Im afraid that
I'm running a java program that uses many vectors. I'm afraid my use of
This will be a bit subjective, I'm afraid, but I'd value the advice of
I have an XML structure that looks like this: <root> <index> <item>item 1</item> <item>item
I'm afraid that the answer is no, but maybe one of you surprises me.
I'm looking for guidance on how to find out which user has modified a

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.