If you need to parse some XML with namespaces in ActionScript 3 you may find this error quite soon: VerifyError: Error #1025: An invalid register 1 was accessed
It all comes because of this line:
default xml namespace = myXML.namespace();It is needed in order to access the values in the namespaced value so removing it is not an option. The problem appears when you call any other function in your object… and you get that weird error.
I haven’t managed to find out why. It kind of seems that changing the namespace (as the very example from Flash’s reference on how to read an RSS feed suggests) also alters the namespace of later function calls, and so the interpreter can’t find the functions.
I found the simplest solution was to reset the namespace back to nothing when I was done with accessing the XML:
default xml namespace = new Namespace('');There should be an explanation for this but I haven’t yet found it. Meanwhile this can save your life :-)
Your note did save my life! Thank you!
(I visited Valencia some time ago – I have nice memories…)
Cheers,
tomek
I’m glad that helped you :-)
Thanks for you help. I’m not going to say it saved my life, but it is going to save me some much needed sleep which I appreciate very much. Thanks from a tired student.:)
Tim
It’s great to hear that helped you to save some hours of sleep – because sleeping is sooo good!! :-)
Another life saved … Thank’s for all.
/me begins to feel flattered :-$
You just saved another life! I was going nuts over this! Thank you!
u are bookmarked !!! :)
thanks
YEA!
bookmarked! :)
thx.
I thought this will not help because I got this error in a List selection, but it DID HELP!!!!
Thanks a lot!
[...] http://soledadpenades.com/2007/07/03/verifyerror-error-1025-an-invalid-register-1-was-accessed/ [...]
Thank you very, very much!
I was faced to this problem too and this simple solution made my day(s)!
Hey, thanks a million. Buy yourself a beer on my behalf. ;)
Awesome, Great find, Thank You!
I followed your post from another website, but just wanted to say thanks! I was up till 1:30 in the morning working on this. I’m sure I would have been there till 5….or until I eventually passed out. Glad I ran across this. I told the other guy, you need to leave a Paypal link on your site. I would have gladly bought you a cup ‘o jo for taking the time to post. You saved me lots of time.
Cool, each time I see someone being able to sleep thanks to this ‘trick’, I feel super happy for you guys & gals.
I might consider the paypal thing I guess! Thx for the comment. You’re welcome :)