June 20, 2007

XML/AS Menu – progress update

Filed under: actionscript, design, open source, program, XML — bardicknowledge @ 11:28 am

Well as seen in this post, I am trying to build a flash xml based menu system. I believe I am just about finished the sucker. But as noted in the first post I was having a problem using an XML variable as a textfield name. Breakthrough this morning though and here we have the answer:

fieldName = menu_xml.childNodes[0].childNodes[ii].childNodes[iii];
link = menu_xml.childNodes[0].childNodes[ii].childNodes[iii].attributes.l;
mainMenu[clipName][fieldName].html = true;
mainMenu[clipName][fieldName].htmlText ="" + bCat + "";

As you can see, the square brackets are acting like the .this[]. but it works. Basically the brackets say look in mainMenu for clipName and then the next set says look in clipName for fieldName. Simple really have you realize you can do the brackets like that.

I will of course share my menu code as soon as I finish it. I will even comment it! I’m so kind xD
I have been thinking about making tutorials but they take a long time and people tend to steal them so I’m unsure. I also don’t have server space so I can’t put up working examples for you to see what it looks like. But luckily almost all of my code is entirely AS since my job is to build prototypes. So I will supply all the code and if it needs to import a swf or anything I will explain it all.

I doubt anyone will be reading this but when I post full code, I will list any known bugs. If you find a way to fix them, or a work around, feel more than free to share it in the comments or email me.

As I said, I am doing this since I know I personally have trouble finding answers to my questions so I figured I can help those that encounter the same problems as me. So if I have helped you, or you can help me, feel free to leave a comment ^_^


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Blog at

%d bloggers like this: