# Loading dynamic with actionscript in a frame

**URL:** <https://forum.kirupa.com/t/loading-dynamic-with-actionscript-in-a-frame/13624>\
**Category:** flash\
**Created:** [February 15, 2003, 7:09pm UTC](https://forum.kirupa.com/t/loading-dynamic-with-actionscript-in-a-frame/13624 "2003-02-15T19:09:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![KIOD](https://avatars.discourse-cdn.com/v4/letter/k/8797f3/32.png) [@KIOD](https://forum.kirupa.com/u/KIOD)\
**Post date:** [February 15, 2003, 7:09pm UTC](https://forum.kirupa.com/t/loading-dynamic-with-actionscript-in-a-frame/13624/1 "2003-02-15T19:09:32Z")

</div>

If I want to load dynamic text without having to press a button. I want it to load in the first frame of my movie automatically when it loads. What should I do?  
What I have so far on a button is :

on (press) {  
loadText = new loadVars();  
loadText.load(“home.txt”);  
loadText.onLoad = function() {  
loadedText.html = true;  
loadedText.htmlText = this.hometext;  
};  
}

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 15, 2003, 7:13pm UTC](https://forum.kirupa.com/t/loading-dynamic-with-actionscript-in-a-frame/13624/2 "2003-02-15T19:13:48Z")

</div>

loadText = new loadVars();  
loadText.onLoad = function() {  
loadedText.html = true;  
loadedText.htmlText = this.hometext;  
};  
loadText.load(“home.txt”);

Just insert it into your first frame of your movie…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 15, 2003, 7:25pm UTC](https://forum.kirupa.com/t/loading-dynamic-with-actionscript-in-a-frame/13624/3 "2003-02-15T19:25:38Z")

</div>

HA. That easy. I must be a dummie in flash.  
Anyway , thanks alot.
