# Anyway to load an external Actionscript file into a frame?

**URL:** <https://forum.kirupa.com/t/anyway-to-load-an-external-actionscript-file-into-a-frame/185476>\
**Category:** Uncategorized\
**Created:** [April 13, 2006, 4:09pm UTC](https://forum.kirupa.com/t/anyway-to-load-an-external-actionscript-file-into-a-frame/185476 "2006-04-13T16:09:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![joran420](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joran420/32/2329_2.png) [@joran420](https://forum.kirupa.com/u/joran420)\
**Post date:** [April 13, 2006, 4:09pm UTC](https://forum.kirupa.com/t/anyway-to-load-an-external-actionscript-file-into-a-frame/185476/1 "2006-04-13T16:09:14Z")

</div>

thats it is there a way to take all the code in a frame and save it to a .AS file and import that .AS file into the frame where the code originally was?

---

<div class="post-metadata">

**Author:** ![JoshuaJonah](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joshuajonah/32/1775_2.png) [@JoshuaJonah](https://forum.kirupa.com/u/JoshuaJonah)\
**Post date:** [April 13, 2006, 4:14pm UTC](https://forum.kirupa.com/t/anyway-to-load-an-external-actionscript-file-into-a-frame/185476/2 "2006-04-13T16:14:12Z")

</div>

you could send it to PHP and write it to a text file then rename the file whatever.as, then use the #include option in Flash to include it again.

---

<div class="post-metadata">

**Author:** ![joran420](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joran420/32/2329_2.png) [@joran420](https://forum.kirupa.com/u/joran420)\
**Post date:** [April 13, 2006, 5:14pm UTC](https://forum.kirupa.com/t/anyway-to-load-an-external-actionscript-file-into-a-frame/185476/3 "2006-04-13T17:14:57Z")

</div>

if i include a as file it can do \_root.onEnter stuff?  
using the normal include(like for custom classes?)

and its scope will only be the frame i place it on right?

---

<div class="post-metadata">

**Author:** ![JoshuaJonah](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joshuajonah/32/1775_2.png) [@JoshuaJonah](https://forum.kirupa.com/u/JoshuaJonah)\
**Post date:** [April 13, 2006, 5:17pm UTC](https://forum.kirupa.com/t/anyway-to-load-an-external-actionscript-file-into-a-frame/185476/4 "2006-04-13T17:17:38Z")

</div>

nope, if you include it in the \_root of your movie, it will be accesable to anything below it. Also it can include onEnterFrame events fine.

And yeah, just use #include like a class file.🙂

---

<div class="post-metadata">

**Author:** ![joran420](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joran420/32/2329_2.png) [@joran420](https://forum.kirupa.com/u/joran420)\
**Post date:** [April 13, 2006, 5:29pm UTC](https://forum.kirupa.com/t/anyway-to-load-an-external-actionscript-file-into-a-frame/185476/5 "2006-04-13T17:29:03Z")

</div>

cool thanks man 🙂
