Flash xml
- Started
- Last post
- 16 Responses
- CFish
Can someone see what I need to change to this script to stop the mc duplicating itself to 10 in this xml menu. I want the menu to only show what is in the xml file? Its something to do with 'less than 10' commend in there but can't figure it out.
function BuildMenu() {
for (i=0; i
- CFish0
and it won't let me paste the code so you can't help anyway...thanks
- CFish0
function BuildMenu() {
for (i=0; i
- CFish0
rubbish
- Bottlerocket0
for (i=0; i=
- Bottlerocket0
stuffed for me too
for (i=0;
.
.
i=< 9;
.
.
i++)I hope you can figure out what i mean
- CFish0
Thanks Maximillion. Are you as good at Flash?
I want to be able to edit the xml and the menu not have any other fields or buttons in that are not in the xml. at the moment it is set to ten or more...
make sense?
- CFish0
I bought the code and am not the best at actionscript in the world...
- skt0
I'm not expert, but you need to only duplicate your movie clip as many times as you have nodes in your xml.
At the moment you just have the loop running until i is less than 10, (9)
This 10 needs to be a variable that is determined by the number of nodes contained in your xml.
- CFish0
Cool, thanks skt.... do i just replace that one bit of code with a var? I'm not to hot on AS
- skt0
Ok, well, if you aren't too hot on AS then parsing xml is probably not the best place to start. I would start with the basics first, do a few tutorials, buy a book.
Nobody here is going to write it for you and you might just be trying to run before you can walk... etc etc.
You could just replace that with a variable, but you would have to populate that variable with information and understand what it represents before you are going to make any sense of this.
- maximillion_0
you need to post more of the code to get a definitive answer, the code you have posted alreadys isnt complete so its hard to see whats happening
- CFish0
Entire code pasted below
I have done basic flash before and the last file I posted all the graphics were embedded and people moaned so I'm just trying to load the folio menu via an xml document that then in turn pulls in jpegs remotely. Thanks for you help and no, I don't expect anyone to do the work for me.
- skt0
At first glance, replace the '10' in your for loop with '_global.listLenth'
although length is spelt incorrectly, you might want to fix that.
- maximillion_0
try that
- CFish0
Great thanks skt and Maximillion the code now works! even with lenth spelt wrong! ...that makes sense!