the only problem is that the button doesn’t work onRelease. i think that it is because there are too many functions there, but at the same time, i think it’s just me…
yea… ok, that works, but only if the url in getURL isn’t a variable… btw, this is all from xml, but don’t worry, all the xml shtuff works fine… i’ve got this variable, item.go, which is an attribute in xml that holds the url…
Ah, but there you’ve got two errors. One, the quotes, and two, the this. The quotes shouldn’t be there because you’re using a string with quotes, and not the variable. So get rid of the quotes. Another thing is the this: since the code is placed inside the onRelease handler of viewer, this will target to viewer. Outside of the viewer onRelease but still inside the item onRelease, this will target to item. So to fix it, use this code:
By the way, that last line is useless. Don’t you mean viewer.onRelease(); ? That will immediately execute the onRelease handler, which I can imagine you wanted to add to debug faster.
Since you are also using XML I strongly advice that you make sure that you’re not using variables that haven’t loaded yet.