# Help with Undefined Variable problem!

**URL:** <https://forum.kirupa.com/t/help-with-undefined-variable-problem/209116>\
**Category:** flash\
**Created:** [December 6, 2006, 1:17am UTC](https://forum.kirupa.com/t/help-with-undefined-variable-problem/209116 "2006-12-06T01:17:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dec27](https://avatars.discourse-cdn.com/v4/letter/d/2bfe46/32.png) [@dec27](https://forum.kirupa.com/u/dec27)\
**Post date:** [December 6, 2006, 1:17am UTC](https://forum.kirupa.com/t/help-with-undefined-variable-problem/209116/1 "2006-12-06T01:17:59Z")

</div>

Hi!

I’m working on a photogallery and I’m using xml to load names, images…  
the problem is: I want a button to open a new browser window but something is wrong with the variable, I think it is because of the function, but still don’t know how to solve it…

Would appreciate very much any comment or help 😃  
Here’s where I think the problem is:

[AS]  
this.onEnterFrame = function() {  
var bytes\_loaded = holder.boton.getBytesLoaded();  
var bytes\_total = holder.boton.getBytesTotal();  
var percent\_loaded = Math.round((bytes\_loaded/bytes\_total)\*100);  
\_root.txt\_mc.name.text = percent\_loaded+" %";  
if (percent\_loaded == 100) {  
holder.\_alpha += 10;  
if (holder.\_alpha\>=98) {  
holder.\_alpha = 100;  
\_root.txt\_mc.name.text = this.title;  
trace (this.link) /////when I trace this.link it works////  
\_root.txt\_mc.onRelease = function() {  
getURL(\_root.link, “\_blank”);  
};  
holder.onRelease = unloadImage;  
delete this.onEnterFrame;  
}  
}  
};  
[/AS]  
Thanks in Advanced!
