# Instantiating my class, from a folder? "Cannot open a protected movie."?

**URL:** <https://forum.kirupa.com/t/instantiating-my-class-from-a-folder-cannot-open-a-protected-movie/228922>\
**Category:** flash\
**Created:** [June 12, 2007, 4:29pm UTC](https://forum.kirupa.com/t/instantiating-my-class-from-a-folder-cannot-open-a-protected-movie/228922 "2007-06-12T16:29:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aesir](https://avatars.discourse-cdn.com/v4/letter/a/e19adc/32.png) [@Aesir](https://forum.kirupa.com/u/Aesir)\
**Post date:** [June 12, 2007, 4:29pm UTC](https://forum.kirupa.com/t/instantiating-my-class-from-a-folder-cannot-open-a-protected-movie/228922/1 "2007-06-12T16:29:00Z")

</div>

[FONT=Times New Roman][SIZE=3]I’ve been looking through documentation, and on the forums, and am hopelessly confused with some of the new things in AS3. I have tried **include** , **import** , and **class paths** to no avail. Anyway…[/SIZE][/FONT]

[SIZE=3][FONT=Times New Roman]_Folder1 est.fla // test fla_[/FONT][/SIZE]  
[FONT=Times New Roman][SIZE=3]_Folder1\Scripts\PhysicsEngine.as // class_[/SIZE][/FONT]

[FONT=Times New Roman][SIZE=3] **Class AS file:** [/SIZE][/FONT]

```auto
 class PhysicsEngine {
            private var age:int;
 
            public function PhysicsEngine(newAge:int) {
                        age = newAge;
                        trace("PhysicsEngine created.");
                        trace("age = " + age + ".");
            }
}

```

[FONT=Times New Roman][SIZE=3]…and…[/SIZE][/FONT]

[FONT=Times New Roman][SIZE=3] **test fla, frame 1:** [/SIZE][/FONT]

```auto
var myEngine:PhysicsEngine = new PhysicsEngine(10);

```

[FONT=Times New Roman][SIZE=3]Just what is wrong with this code? I have a class path set up which is supposed to be importing the “Scripts” folder into frame 1.[/SIZE][/FONT]

[FONT=Times New Roman][SIZE=3] **I also get a nasty error: Cannot open a protected movie.** [/SIZE][/FONT]
