# Can actionscript write html? MX question

**URL:** https://forum.kirupa.com/t/can-actionscript-write-html-mx-question/20331
**Category:** flash
**Created:** [May 7, 2003, 4:02pm UTC](https://forum.kirupa.com/t/can-actionscript-write-html-mx-question/20331 "2003-05-07T16:02:59Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![duffs](https://avatars.discourse-cdn.com/v4/letter/d/b5a626/32.png) [@duffs](https://forum.kirupa.com/u/duffs)
#### Post date: [May 7, 2003, 4:02pm UTC](https://forum.kirupa.com/t/can-actionscript-write-html-mx-question/20331/1 "2003-05-07T16:02:59Z")

</div>

Hi I am a newbie to actionscript with limited javascript experience. i’d like to know if actionscript is able to write html to the page becuase I want to include title tags and a link to a new page with a randon image script.

I used the script I found for loading random backgrounds @ [kirupa.com](http://kirupa.com) and have modifed it to include  
load in random jpg files like so:

photoclip.loadMovie(“photo0.jpg”);  
choice = Math.round(Math.random()\*5);  
switch (choice) {  
case 0 :  
break;  
case 1 :  
photoclip.loadMovie(“photo1.jpg”);  
break;  
case 2 :  
photoclip.loadMovie(“photo2.jpg”);  
break;

//more cases follow…  
}  
the next step is to display html titles tags so the user can see a description of the photo, when they rollover the image.  
Is this possible using some kind of actionscript equivalent for document.writein ?

thanks for your help

---

<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: [May 8, 2003, 7:59am UTC](https://forum.kirupa.com/t/can-actionscript-write-html-mx-question/20331/2 "2003-05-08T07:59:05Z")

</div>

you’d need to put a Dynamic TextField on stage… you can than change its contents with:

```auto
myTextField.text = "new text here";

```

---

<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: [May 8, 2003, 3:15pm UTC](https://forum.kirupa.com/t/can-actionscript-write-html-mx-question/20331/3 "2003-05-08T15:15:23Z")

</div>

And if you really want to write HTML, you could create a Javascript function that you’ll call from Flash with getURL 🙂
