# How to do this?

**URL:** <https://forum.kirupa.com/t/how-to-do-this/237722>\
**Category:** Uncategorized\
**Created:** [September 3, 2007, 5:18am UTC](https://forum.kirupa.com/t/how-to-do-this/237722 "2007-09-03T05:18:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![twistedpixel](https://avatars.discourse-cdn.com/v4/letter/t/35a633/32.png) [@twistedpixel](https://forum.kirupa.com/u/twistedpixel)\
**Post date:** [September 3, 2007, 5:18am UTC](https://forum.kirupa.com/t/how-to-do-this/237722/1 "2007-09-03T05:18:42Z")

</div>

I have the following code in my application.

```auto
if (posbuttlistener.click){var txt_url="pos.txt"}else { if (invbuttlistener.click)var txt_url="inv.txt"}

```

I am filling in a text display component dynamically based on buttons that are clicked,so that appropriate txt\_url variable is given the selection. But when I play the movie I see that only the first if is working, the else part never works…can anyone help ?TIA!
