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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:35:33+00:00 2026-05-21T03:35:33+00:00

So I’ve never worked with Vectors in Flash before and I wanted to write

  • 0

So I’ve never worked with Vectors in Flash before and I wanted to write a little test application with a Vector using a custom object. But I’m getting: error 1000: Ambiguous reference to Vector when I try launching the application. I can’t figure out for the life of me what’s wrong. I tried not using a custom object and just instantiating a string Vector from an online tutorial and I’m getting the same thing.

Here’s what I got:

package
{
import TestPlayer; // The custom player class
import flash.display.MovieClip;

public class Vector extends MovieClip
{
    private var array:Array = new Array();
    private var vector:Vector.<TestPlayer>;

    public function Vector()
    {
        array[0] = [0, 0, "Bob", false];
        array[1] = [1, 0, "Frank", true];
        array[2] = [2, 1, "Sarah", true];
        Load();
    }

    private function Load():void
    {
        var aPlayer:Player = null;
        vector = new Vector.<TestPlayer>();

        try
        {
            var numRows:int = array.length;

            for (var i = 0; i < numRows; i++)
            {
                aPlayer = new Player();

                aPlayer.playerID = array[i][0];
                aPlayer.playerName = array[i][1];
                aPlayer.playerTypeID = array[i][2];
                aPlayer.hasProgress = array[i][3];

                vector.push(aPlayer);
            }
        }
        catch (error:Error) { }
    }
}

The custom player class looks like this:

package
{
    public class TestPlayer
    {
        private var _playerID:int;
        private var _playerName:String = "";

        public function get playerID():int 
        {
            return _playerID;
        }

        public function set playerID(value:int):void 
        {
            _playerID = value;
        }

        public function get playerName():String 
        {
            return _playerName;
        }

        public function set playerName(value:String):void 
        {
            _playerName = value;
        }
            [...]
    }
}

I don’t know if it matters, but I’m working in Flash CS5, and I have a blank FLA that imports the class. No other errors so far. Hope you can help. Let me know if you need anymore info, thanks.

  • 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-21T03:35:33+00:00Added an answer on May 21, 2026 at 3:35 am

    The ambiguous reference is because you’ve got a naming collision. The class you’ve written is named “Vector”, which it can’t distinguish from the top-level class Vector. The fix is simple, avoid naming your classes the same as a pre-existing class.

    If both classes belong to separate namespaces, you can reuse class names, as long as you use thier fully-qualified name whenever you call the class.

    Assume you have a class:

    package foo.bar
    {
      class MovieClip
      ...
    }
    

    You could instantiate both types of MovieClips as follows:

    flashMovieClip = new flash.display.MovieClip();
    myMovieClip = new foo.bar.MovieClip();
    

    Unfortunately, both your Vector and the flash Vector exist in the top-level namespace, so (AFAIK) there’s no way of removing the ambiguity without renaming your class. For simplicity sake, avoid naming collisions and you should be golden.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I have a French site that I want to parse, but am running into

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.