XML/Flash prob
- Started
- Last post
- 45 Responses
- jpea
anyone have an idea what's wrong with this?
I'm trying to duplicate mc's based on how many items i have in my xml object. All the XML traces out just fine, and I have a clip in my library with an identifier of 'multiply_mc' and a 'container' on my stage.xml file and as are here:
http://clear-interactive.com/tem…
http://clear-interactive.com/tem…argh!!
- fusionpixel0
if it traces correctly, I would assume it has to do with the code that duplicates the MC's in run time.
- jpea0
yeah, seems to be the way.
it traces out the right number of xml nodes in the object, but it only creates like 4 mc's for some reason, and the text from the xml isn't being pushed into the mc's text fields. i just can't see what's wrong with it. grrrr...
- jpea0
anyone?
- canuck0
nerds
- jpea0
i know
- jpea0
*sunday bump
- unfittoprint0
small issue with setInterval + container created dinamically
- jpea0
doesn't seem to fix it though :-(
are those ':Void' tags AS2?
cause if I use mx2k4, there aren't any errors that come up, but it traces 'NaN nodes done'ideas?
(btw, thanks a ton for the help with this.. unfit, you got me to this point from your help last week... HUGE step in my coding)
- jpea0
using mx2k4, it also doesn't seem to actually get to doing the buildIt function. if i trace anything after the 'cnt == total', the trace isn't executed.
- Mick0
Have you checked your depth for duplicated MCs is set properly... perhaps you're duplicating on existing depths or something.
- jpea0
http://pastebin.coconut.se/?id=3…
i figured out why it didn't run the buildIt function. it shouldn't have been cnt == total, rather i==total.
http://pastebin.coconut.se/?id=3…
but some issues, same as before really. the nodes get counted correctly, but if i put a trace in the loop after i create the empty movie clip, only 4 comes back (should be 12, as there's 12 items in the xml file).
ideas on why?
- randoman0
trace (total);
what do you get? Is it greater than 4?
- jpea0
trace total i get 12
but if i run through the loop after creating the empty clip, it only traces 4 times.
- randoman0
try changing this:
for(var i=0;i
- unfittoprint0
well, if there's 12 nodes, it should trace 12. it could be a xml error [utf-8 encoding rather than iso-8859-1 might be needed].
the AS code lacked an object that 'persisted' throughout the code: _root[objname] is now obj.
- randoman0
sorry, it cut my code out...
check the pastebin
I did some editing under name randoman. Let me kinow if this works.
- jpea0
checked the encoding, but it traces out the number of nodes nicely.
the latest version in the pastebin, doesn't go to the buildIt function. it stops at the if i==total. (which should be i==cnt i think).
but if i hard code it to i==12, it goes, it traces the 'parsing finished' but doesn't actually run the buildIt function. This makes me think that it's just something wrong with that function and how it reads the object nodes or something.
- unfittoprint0
I think I know what's the problem:
Once I made a mutlilevel menu, that would read an XML tree, regardless of its depth.
I realized that for each time the parser went a node deeper, a temporary value add to be created for it "remember" where it left off when returning to the parent node... so the count can continue...
a bit confusing, hope u understand...
- jpea0
hmmm...
thing is that the parser seems to find all the nodes. the build function just won't build 'em.hmm... monday morn' bump i suppose
- fate_redux0
Well jpea, your objName.length is equal to 4. I don't know why though.