XML/Flash prob
- Started
- Last post
- 45 Responses
- Donzo0
If you change "total = obj.firstChild.childNodes.length... to "total = beerXML.firstChild.childNodes.le... that'll give you the correct number of nodes to check when you use "if(i == total)".
After that it creates the movies for me.
- fate_redux0
It's easier than that.
just change your buildIt function's For loop to this. Cnt is the variable you should be comparing to for the total, right?
for (var i = 0; i
- fate_redux0
of ffs, goddamn NT stripping out the code.
for (var i = 0; i < cnt; i++) {
- jpea0
in the parseMe function?
i tried what you suggested, but didn't work. how'd you have it set p??? (just a clip in the library with multiply_mc as it's identifier and this on the root timeline???)
- jpea0
change it in the pastebin if you want:
http://pastebin.coconut.se/?id=3…
- fate_redux0
No, I was talking about in the buildIt Function. function buildIt().
That's what we're really having problems with, right? Parsing works fine.
- fate_redux0
Here dude, here's my working FLA. I'm using MX and I changed your attachMovie to a dupMovie, so forgive me for that, I didn't want to dick about that much.
- Donzo0
You should also change the "container = this.createEmptyMovieClip" to "container = _root.createEmptyMovieClip"
- unfittoprint0
http://pastebin.coconut.se/?id=3…
small update: it's safe to start the interval at the end of the parser function - it will only be triggered after every nested "for loops" are finished.
- Donzo0
I pasted it
- jpea0
fate, thanks a ton!
- jpea0
ok, new situation (the situation i had at the very beginning of learning this, and the reason why I needed to learn how to do it this way i suppose),
even with:
beername.autoSize = true;
beername.wordWrap = true;
beername.multiline = true;
desc.autoSize = true;
desc.wordWrap = true;
desc.multiline = true;in the multiply_mc clip, the they don't go more than 1 line.
ideas on how to make that work?
- Donzo0
fate - how was it simpler to add a duplicate movie to the timeline and change the code to duplicate than change a couple of lines in the code?
;)
- unfittoprint0
remember if you wan to add you should use
beername.text += txt;
or
beername.text =
beername.text + txt;instead of
beername.text = txt;
- fate_redux0
Donzo, I only did that because it was an easier way to rebuild the FLA structure. The code for jpea would have worked with the simple change I suggested.
- fate_redux0
If you want multiline, just modify the textbox properties in the properties panel. Here's multiline FLA:
- jpea0
thanks fate,
but i needed the multiline to be dynamic in size, as to accept whatever size text line that gets pushed into it. this way, the top of the next generated clip would line up nicely with the bottom of the clip above it. that's kinda the whole reason why i did this with an xml object rather that just loadinga text file in the first place :-/
- fate_redux0
ah, interesting problem. I've never tried that.
- Solid0
Here - try this:
- Solid0
Subsitute into fate_redux's 'xml_multiline.zip' package ..