# Manipulating a variable...simple question

**URL:** <https://forum.kirupa.com/t/manipulating-a-variable-simple-question/251828>\
**Category:** Uncategorized\
**Created:** [February 13, 2008, 1:10am UTC](https://forum.kirupa.com/t/manipulating-a-variable-simple-question/251828 "2008-02-13T01:10:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![brianjs\_04](https://avatars.discourse-cdn.com/v4/letter/b/2bfe46/32.png) [@brianjs\_04](https://forum.kirupa.com/u/brianjs_04)\
**Post date:** [February 13, 2008, 1:10am UTC](https://forum.kirupa.com/t/manipulating-a-variable-simple-question/251828/1 "2008-02-13T01:10:40Z")

</div>

O.k., I’ve got a very simple movie, as follows

I have a movie clip on my main timeline called “bottles”. Inside of that I have a movieclip called “firstbottle” (among others).

Just want to bring the alpha down on it using a variable (since later the target is going to change to “secondbottle”, etc.)

So - on a button on the main timeline I have the following code:

on (release) {  
bottles.current=“firstbottle”;  
bottles.current.\_alpha=0;  
trace(bottles.current);  
}

The Trace statement does yield the correct string (‘firstbottle’) – but the alpha of firstbottle is not being changed.

FYI - if I hard code the second line to “bottles.firstbottle.\_alpha=0;”… it works correctly, so my basic structure is correct… but clearly I’m not manipulating the variable correctly.

Any help appreciated…

- Brian
