# How to use text as buttons?

**URL:** <https://forum.kirupa.com/t/how-to-use-text-as-buttons/29608>\
**Category:** Uncategorized\
**Created:** [August 28, 2003, 4:35pm UTC](https://forum.kirupa.com/t/how-to-use-text-as-buttons/29608 "2003-08-28T16:35:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Inflicted](https://avatars.discourse-cdn.com/v4/letter/i/82dd89/32.png) [@Inflicted](https://forum.kirupa.com/u/Inflicted)\
**Post date:** [August 28, 2003, 4:35pm UTC](https://forum.kirupa.com/t/how-to-use-text-as-buttons/29608/1 "2003-08-28T16:35:31Z")

</div>

I can’t figure this out!  
I want to use text in my movie to trigger swf’s, but is there a way to do this other than having to make every sentence or word into a button? (Am I making myself clear?)

regards

---

<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:** [August 28, 2003, 8:36pm UTC](https://forum.kirupa.com/t/how-to-use-text-as-buttons/29608/2 "2003-08-28T20:36:51Z")

</div>

```php
<a href=ascommand:function,arguments;>link</a>

```

---

<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:** [August 28, 2003, 8:53pm UTC](https://forum.kirupa.com/t/how-to-use-text-as-buttons/29608/3 "2003-08-28T20:53:19Z")

</div>

wait so are you trying to do this in flash? i dont quite know what you mean.

---

<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:** [August 28, 2003, 9:34pm UTC](https://forum.kirupa.com/t/how-to-use-text-as-buttons/29608/4 "2003-08-28T21:34:27Z")

</div>

wowowow fluid can you clarify that ? i’ve been looking for this for decades…

btw this should’nt be in the D&D section…

---

<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:** [August 29, 2003, 10:55am UTC](https://forum.kirupa.com/t/how-to-use-text-as-buttons/29608/5 "2003-08-29T10:55:08Z")

</div>

What I mean is I’m trying to make a website in Flash, and want to use text as buttons. But since there is a lot of text, I wondered if there is another way of doing this. Otherwise I would have to make every sentence into a button.  
Should this be in the AS section?  
Sorry, newbie…

---

<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:** [August 29, 2003, 12:00pm UTC](https://forum.kirupa.com/t/how-to-use-text-as-buttons/29608/6 "2003-08-29T12:00:20Z")

</div>

```auto

/* 
create a generic function for this example. However, you can use any function you like. Note 
that you can use any function you like, but you can only use one argument. This is why I've 
used split on the passed string. 
*/
function traceMe(str){
	str = str.split("|");
	for(var i = 0; i < str.length; i++){
		trace(str*);
	}
}
// create the textfield we will use.
this.createTextField("text_txt", 100, 100,100, 400, 100);
text_txt.html = true;
// make our hyperlink.
text_txt.htmlText = "<a href='asfunction:traceMe,Hi|Bye|My'>Click on me for eternal satisfaction!</a>";

```

the above code was for MLK.

Inflicted, if you are familiar with AS, you can just make one button with a dynaminc text box, and then change the value of that by it’s instance name.

---

<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:** [August 29, 2003, 12:33pm UTC](https://forum.kirupa.com/t/how-to-use-text-as-buttons/29608/7 "2003-08-29T12:33:23Z")

</div>

Well, I just started using Flash&AS for a couple of weeks, but these examples make it a lot easier for me to understand it, than just copying codes and not knowing what it means. Now I have to find out myself what it actualy means. Is there a source file for the code you just gave me that I can look at? Makes it easier…  
Regards
