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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:28:39+00:00 2026-06-07T17:28:39+00:00

I know there are a million questions on the web regarding the AS3 compiler

  • 0

I know there are a million questions on the web regarding the AS3 compiler error 1120: Access of undefined property <property>, but this case is just weird.

I am skinning an <s:Application> component in Flex 4.6, and I am within the skin MXML file. The line super.addEventListener(Event.ADDED_TO_STAGE, positionObjects); is giving me issues saying: 1120: Access of undefined property positionObjects. However positionObjects is declared right underneath it. Any idea what’s wrong?

<fx:Script>
    <![CDATA[
        /**
         *  @private
         */
        override protected function updateDisplayList(unscaledWidth:Number, 
            unscaledHeight:Number) : void
        {
            bgRectFill.color = getStyle('backgroundColor');
            bgRectFill.alpha = getStyle('backgroundAlpha');
            super.updateDisplayList(unscaledWidth, unscaledHeight);
        }

    //Listen for when objects are added to the stage, before positioning them
        [Bindable]
        private var logoX:Number = 0;

        super.addEventListener(Event.ADDED_TO_STAGE, positionObjects);

        private function positionObjects(e:Event):void {
            this.logoX = stage.stageWidth / 3;
        }
    ]]>
</fx:Script>

Thank you for your time.

  • 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-07T17:28:41+00:00Added an answer on June 7, 2026 at 5:28 pm

    I figured out why I was getting an error. I wasn’t thinking and assuming that I could add an event listener outside of an initialization handler. I was, for some reason, thinking that AS3 would run through the compiled <fx:Script> tag the way interpreters execute procedural scripts.

    I didn’t think, again, for some reason, to add an addedToStage attribute to the <s:Skin> tag, and have it execute the positionObjects method from there. All is well now.

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

Sidebar

Related Questions

I know there have been a million questions asking this, but mine is different.
I know there are a million of these questions in SO, but this is
I know there are a lot of questions around on this subject, but I've
I know there's a million similar questions already, but I'm not sure they apply.
Hey guys, I know that there are a million questions on random numbers, but
I know there is a lot on this topic but I can't get any
I know there are a lot of similar questions on SF, but I think
My apologies, I know there are a million questions on pointers, arrays etc. although
I know this question was asked million times but I used lots of advices
I know there have been many questions on grid and pack in the past

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.