# Variables madness ?!?

**URL:** https://forum.kirupa.com/t/variables-madness/95378
**Category:** Uncategorized
**Created:** [November 24, 2003, 11:30pm UTC](https://forum.kirupa.com/t/variables-madness/95378 "2003-11-24T23:30:23Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![bobaphatt](https://avatars.discourse-cdn.com/v4/letter/b/ce73a5/32.png) [@bobaphatt](https://forum.kirupa.com/u/bobaphatt)
#### Post date: [November 24, 2003, 11:30pm UTC](https://forum.kirupa.com/t/variables-madness/95378/1 "2003-11-24T23:30:23Z")

</div>

HELP  
I just dont understand this:  
i define the variable \_root.thumb = 0 in a clip  
and some other variables  
and this array: \_root.pArray=[“yadayada”, “yadayada”]  
now I trace these variables from another button (\_root.container.fotoframe.negatief):

onClipEvent (load) {  
l = this.getBytesLoaded();  
t = this.getBytesTotal();  
p = this;  
a = \_root.pArray.length;  
trace(\_root.thumb);  
if (t\>0 && t == l) {  
w = p.\_width/-2;  
h = p.\_height/-2;  
p.\_x = w;  
p.\_y = h;  
trace(a)  
trace(\_root.thumbbar.\_width)  
trace(“loaded”);

```
	trace("Datas"+t);
}

```

}

so in the first frame everything’s ok, all traces return their proper values, but as soon as a clip (a JPG) is loaded in this clip all values (except “t”) return “undefined”:puzzle:

what am i doing wrong?  
(i’m just a newbie, so I appologize if this looks stupid)
