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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:46:03+00:00 2026-05-26T08:46:03+00:00

I have a simple question,in the below example when i created a new TransitionManager

  • 0

I have a simple question,in the below example when i created a new TransitionManager and pass this as a parameter a error occured that says Implicit coercion this is type Class.Why i have to typecast the Object in order to work,i thought object becomes a MovieClip after it extends it.

package {

 import fl.transitions.*;
 import fl.transitions.easing.*;
 import flash.display.MovieClip;
 import flash.events.MouseEvent;

 public class Border extends MovieClip
 {   
   var trManager:TransitionManager = new TransitionManager( MovieClip(this) ); //<--

   public function Border( ) {
   }   

   public function doRotate ( ev : MouseEvent)
   {
      trManager.startTransition({type:Rotate, direction:Transition.OUT, duration:3, easing:Strong.easeInOut, ccw:false, degrees:90});
   }
  }
 }
  • 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-26T08:46:03+00:00Added an answer on May 26, 2026 at 8:46 am

    It seems like you stumbled across a strange oddity in the Flex compiler.

    For a while, it seemed like the this referred to the static class type, but I was wrong, it seems to be just a bug in the compiler, misinterpreting the type of this at compile time.

    I wouldn’t recommend using this approach though, as the members will be initialized before the constructor is called. Have a look at this example:

    package  
    {
        public class Foo
        {
            private var bar1:Bar = new Bar("at bar1", Foo(this));
    
            public function Foo()
            {
                var bar2:Bar = new Bar("in constructor", this);
            }
    
            private var bar3:Bar = new Bar("at bar3", Foo(this));
        }
    }
    
    class Bar {
    
        public function Bar(scope: String, x:*):void {
            trace(scope, x is Foo);
        }
    
    }
    

    and the obvious answer is:

    at bar1 true
    at bar3 true
    in constructor true
    

    If the constructor was actually suppose to do some real initializations, you would actually use it uninitialized.

    In conclusion, keep it simple, move the field initialization in constructor, that’s what they are for anyway.

    var trManager:TransitionManager;
    
    public function Border( ) {
        trManager = new TransitionManager(this);
    }   
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple basic question about C# and inheritance. In the below example,
The question is as of the title. Say I have a simple example below:
I have a simple but subtle question. Below you see two different declaration variants
I have a simple question related to one-line programming. First an example: function test(a)
I have a simple question, but I'm about 80% sure that the answer to
I have a simple question that I am posing mostly for my curiousity. What
Say I have a simple PHP loop like this one // Bad example $array
I have a simple question. Is there a way ( using reflections I suppose
I have a simple question and wish to hear others' experiences regarding which is
I have a simple question about Java's XML API and I hope there's 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.