# Problem with assigning value

**URL:** <https://forum.kirupa.com/t/problem-with-assigning-value/228707>\
**Category:** Uncategorized\
**Created:** [June 10, 2007, 8:22pm UTC](https://forum.kirupa.com/t/problem-with-assigning-value/228707 "2007-06-10T20:22:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pdo100](https://avatars.discourse-cdn.com/v4/letter/p/eb8c5e/32.png) [@pdo100](https://forum.kirupa.com/u/pdo100)\
**Post date:** [June 10, 2007, 8:22pm UTC](https://forum.kirupa.com/t/problem-with-assigning-value/228707/1 "2007-06-10T20:22:26Z")

</div>

Hi,

the following script brings me a problem:

w = this[“ha”, “hb”, “hc”, “hd”];  
w.onPress = function() {  
myClip.\_visible = true;  
}

How to assign to variable “w” values from the square bracket that are separated by comas to be assigned either one of them and not only the last value “hd”. In this case whichever value is pressed makes myClip visibility true.

Is this understandable?

fla file attached.

Thanks
