# Interfaces not found (Error #1045, #1046)

**URL:** <https://forum.kirupa.com/t/interfaces-not-found-error-1045-1046/291405>\
**Category:** flash\
**Created:** [June 29, 2009, 12:24pm UTC](https://forum.kirupa.com/t/interfaces-not-found-error-1045-1046/291405 "2009-06-29T12:24:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Josflos](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@Josflos](https://forum.kirupa.com/u/Josflos)\
**Post date:** [June 29, 2009, 12:24pm UTC](https://forum.kirupa.com/t/interfaces-not-found-error-1045-1046/291405/1 "2009-06-29T12:24:10Z")

</div>

Hi.  
First, I sinned, by doing horrible things like developing a whole flash-website  
with all code attached to frames and movieclips, without using _one_ class.

Then I read things about OOP (like [senocular’s writings](http://www.kirupa.com/developer/oop2/AS2OOPindex.htm) on [kirupa.com](http://kirupa.com))  
and about design patterns (Moock’s lectures on his site: [Observer and [URL=“http://moock.org/lectures/mvc/”]MVC](http://moock.org/lectures/introToPatterns/)).

Now I want to try my luck by scripting an AS-driven game, combining all this wisdom.  
Before I will do that, I am trying to take over the example Moock gave on the page  
where he explains model-view-controller (just so I get the hang of mvc)  
It is a simple clock application, mvc-style. And here we have arrived at the problem.[INDENT][SIZE=2] **The Problem** : The compiler cannot find certain interfaces.[/SIZE]  
[/INDENT]For example, the first error message I get when testing/debugging is the following:

_“1045: Interface IObserver was not found.”_

This error comes from “AbstractView”, in the class definition (_… implements IObserver …_)

```php
package mvc
{
    import util.IObserver;
    import util.Observable;
    
    public class AbstractView implements IObserver, IView
    {
        //I am pretty sure the problem has nothing to do 
        //with the content of my classes/interfaces.
    }
}

```

So we check IObserver, and nothing seems to be wrong there too.

```php
package util
{
    import util.Observable;

    interface IObserver
    {
    }
}

```

When I just delete “_IObserver_” from “_AbstractView implements IObserver, IView_”,  
the error does not appear any more (which is expectable).

But then the compiler goes further into the code,  
and spits out other errors who are similar.  
For example:  
“_1046: Type was not found or was not a compile-time constant: IController._”  
in ClockTools _or_ in ClockAnalogView (classes from the mvc-clock example).

* * *

My folder/packages structure:

```auto
Classes:
-> clock
      - all clock classes
      - ...
-> mvc
      - AbstractController.as
      - AbstractView.as
      - IController.as
      - IView.as
-> util
      - IObserver.as
      - Observable.as

```

* * *

I have no real clue what could be the problem.  
I have taken file/folder access into account, but all files/folders have  
full write/read permission and are not hidden.

This whole mess is kind off a disappointment in my first real steps  
into oop and design patterns.  
Therefore I would really like some help or opinions about this.

Sincerely,  
Tomas
