Skip navigation
Currently Being Moderated

vector. error 1046. Type was not found or was not a compile type...

Jul 18, 2012 7:32 AM

Type was not found or was not a compile type constant at compile time.

BUT I have imported import flash.display.MovieClip; amd my vector variable declaration is correct.

 

private var myVect:Vector.<MovieClip >  = new Vector.<MovieClip > (5,true);

 

I am even copying and pasting from a tutorial so this is very strange.

 
Replies
  • kglad
    72,227 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 18, 2012 8:26 AM   in reply to codeBeastAdobe

    copy and paste the error message.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 18, 2012 8:30 AM   in reply to codeBeastAdobe

    try

     

    import flash.display.MovieClip;

     


    private var myVect:Vector.<MovieClip> = new Vector.<MovieClip>(5,true);

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 18, 2012 11:04 AM   in reply to codeBeastAdobe

    that is not exactly the same code that I posted

     

    You need add:

     

    import flash.display.MovieClip;

     
    |
    Mark as:
  • kglad
    72,227 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 18, 2012 11:10 AM   in reply to codeBeastAdobe

    tick file/publish settings/swf and tick "permit debugging".   take a screenshot showing the error message and attach it here.

     

    take a sceenshot of the first 20 or 30 lines of that class showing you import statement and class name.  attach it here.

     
    |
    Mark as:
  • kglad
    72,227 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 18, 2012 11:44 AM   in reply to codeBeastAdobe

    that error message won't be triggered by anything you've shown.

     

    tick file/publish settings/swf and tick "permit debugging".   copy and paste the complete error message

     
    |
    Mark as:
  • kglad
    72,227 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 18, 2012 3:43 PM   in reply to codeBeastAdobe

    there's another as3circle class being used by whatever fla you're using to test.

     

    if the code you've shown has been saved to as3circle.as, try using a new directory to save your fla and your class.  if you haven't saved your shown code to that file, save it and retest.

     
    |
    Mark as:
  • kglad
    72,227 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 19, 2012 6:07 AM   in reply to codeBeastAdobe

    you're welcome.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points