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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:36:05+00:00 2026-06-01T11:36:05+00:00

So for instance, I’ve got three .as files called ‘Helicopter.as, Game.as, Blue.as’ and I

  • 0

So for instance, I’ve got three .as files called ‘Helicopter.as, Game.as, Blue.as’
and I also have a .fla file called Helicopter.fla (These files are all suppose to link together, to make the helicopter game) . In the Game.as file, I have the following;

if (blue1.hitTestObject(Helicopter))

                {
                    trace("YOU HIT THE BLOCK!");

                    Helicopter.x = 76;
                    Helicopter.y = 217;
                }

I have drawn the so called ‘Helicopter’^ using API in a different file called Helicopter.as using this code;

        graphics.beginFill(0x00FF00);
        graphics.drawCircle(0, 60, 35);
        graphics.endFill();

However, I originally had the “Helicopter’ symbol drawn in the Helicopter.fla file (which I’ve now deleted), and now that I’ve drawn the ‘Helicopter’ using API, I get this error;

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

Flash doesn’t recognise the original Helicopter symbol (in the Helicopter.fla file, because I deleted it). But I want the system to detect the ‘circle’ drawn using API (In the Helicopter.as file). And I have no idea how to how to name the API drawn circle ‘Helicopter’, thus I’m getting an error. So how do I name the API circle to ‘Helicopter’, so the Game.as file recognises it. If you have no idea what I’m talking about, then don’t worry, because I don’t know too. Thank you. If you want, I can paste all the code I’ve done so far.

  • 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-01T11:36:07+00:00Added an answer on June 1, 2026 at 11:36 am

    Helicopter is a class not a variable, therefore you cannot assign Helicopter.x. You need to create a variable var heli:Helicopter = new Helicopter(); and use heli.x

    it also could be that you’re not following the programming standards, and Helicopter is in fact a variable and not a Class, though the error seems to indicate otherwise.

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

Sidebar

Related Questions

For instance, you have an application which processes files that are sent by different
For instance, if I have got a vector describing a rectangle xy=[165 88; 401
My instance swap file is disappearing when I start my instance. I have an
For instance, I want to know if these files exists. http://www.stackoverflow.com/favicon.ico http://www.stackoverflow.com/reset.css and then
For instance I have a .php that creates a temporary file, and the server
For instance, suppose I have a graph G = (V, E) where V =
For instance, if I have a label: Blah blah bladity blah I want the
For instance, if I have: <div data-bind=visible: viewModel.property1() || viewModel.property2() /> ... if viewModel.property1()
for instance something like: <apple /> will serialize just fine to a class called
For instance, I have just found myself writing the following traits like class: template<class

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.