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

The Archive Base Latest Questions

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

I am working on a Flash application that draws polygons vertex by vertex line

  • 0

I am working on a Flash application that draws polygons vertex by vertex line by line from a few tutorials.

The problem – I have it all working in Flash Player 10, but need it in Flash Player 9. When I convert it to Flash Player 9, I get these errors:

  • AS_Classes\Polygon.as, Line 8 1046: Type was not found or was not a compile-time constant: Number.
  • AS_Classes\Polygon.as, Line 9 1046: Type was not found or was not a compile-time constant: int.
  • AS_Classes\Polygon.as, Line 18 1120: Access of undefined property Number.
  • AS_Classes\Polygon.as, Line 19 1120: Access of undefined property int.

    • How do I convert this to Flash Player 9?
    • Is there simple replacements for these? I think it is “drawPath()” that is Flash 10.

This, “var vertexList:Vector.;
vertexList = new Vector.(); ” … is also used throughout the code for “graphics.moveTo(vertexList[vertexList.length-1].x”, although I think that “moveTo()” is compatible for Flash 9.

Part of the code throwing the first errors:

package com.AS_Classes {
    import flash.display.Sprite;

    public class Polygon extends Sprite{
        (Line 8) public var pathCoords:Vector.<Number>;
        (Line 9) public var pathCommands:Vector.<int>;

        public var fillColor:uint;

        public function Polygon(_vertexList,_fillColor=0x000000) {
            fillColor = _fillColor;

            (Line 18) pathCoords = new Vector.<Number>();
            (Line 19) pathCommands = new Vector.<int>();

            //first moveTo
            pathCommands[0]=1;
            pathCoords.push(_vertexList[0].x);
            pathCoords.push(_vertexList[0].y);

            //next LineTos
            for (var i:int = 1; i<= _vertexList.length-1; i++) {

                pathCoords.push(_vertexList[i].x);
                pathCoords.push(_vertexList[i].y);
                pathCommands.push(2);

            }

            //final LineTo
            pathCommands.push(2);
            pathCoords.push(_vertexList[0].x);
            pathCoords.push(_vertexList[0].y);
        }

        public function Re_Draw():void{
            this.graphics.clear();
            this.graphics.beginFill(fillColor);
            this.graphics.drawPath(pathCommands,pathCoords);
            this.graphics.endFill();
        }
    }
}
  • 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-26T11:32:04+00:00Added an answer on May 26, 2026 at 11:32 am

    I don’t think vectors are supported in Flash Player 9. A vector is an array that knows what type to expect, the type is specified between the carrots <SomeType>.

    The simple solution would be to change all the vectors to simple arrays. So where you see something like Vector.<Number>, just put Array.

    Of course, there’s a performance hit.

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

Sidebar

Related Questions

All, I'm working on a Flash application that's supposed to send XML data to
I am working on a windows application that has a shockwave flash player embedded
I have a Flash AS3 application that uses FileReference.browse() to request a SWF from
I'm currently working on a Flash application that has a sibling AIR equivalent. From
I have an Adobe Air application(based in flash) that loads in PNG files from
I'm working on a flash application that needs to communicate with my C++ server
I have a flash map application that I want to rebuild on the new
I'm working with a flash application that runs as a standalone executable by way
I have developed an image uploading application that uses Flash to load an image,
I have a Flex application embedded in a Flash application, which was working fine

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.