flash help / Unfit??
- Started
- Last post
- 24 Responses
- snizl
I am working on an xml driven flsh map that gets populated with dynamic mc's. You can see a working version here :http://www.meritagehomestexas.c...
and the source code here:
http://pastebin.coconut.se/?id=4…The problem I am running into is when I am attaching the information into the pop-ups of the multiple community mc's its only attaching the very last instance and not the previous ones. I can't figure out why. Everything is tracing out ok.
The code in question starts where the comment
//pop1 sub info
starts. Any help is greatly appreciated
- unfittoprint0
I think you could great simplify your code:
#1 for starters there's a lot of patterns that could be singled out in one loop.
#2 I don't see a reason to differentiate all submc's names.... you can't handle all this stuff if your project increases
#3 You're rewriting the same mc, over and over, and that's why you only see your last loop output.
- snizl0
How do I fix it so that it doesn't rewrite over the loops last output? And what you suggest I do about the sub mc names?? I appreciate you giving this a look.
I know the code is kind of verbose, I had to learn a lot of stuff in a short amount of time.
- unfittoprint0
been there
actually it seems you already are familiar with the xml tree structure because you dealing with some patterns.
The more you spot, the smaller the code.
here's a little help
- snizl0
Wow, awesome thanks. Now I am just getting an error
Statement block must be terminated by '}'
function parseXML(valid)
- unfittoprint0
must have erased a bracket there.
[tip: cut everything from within the major brackets and copy/paste step by step: next major {} > next major {} etc... to find where the error is...]
anyway check the code and how patterns were replaced by [in this particular case] FOR loops, reducing the size of the code.
- snizl0
Awesome, thanks man, I really appreciate it. The way you set up the code is so much more efficient. Now its time to go through it all to fully understand what you did. Thanks again.
- unfittoprint0
refresh();
- snizl0
**Error** Scene=Scene 1, layer=actions, frame=1:Line 152: The class 'Aray' could not be loaded.
var cName:Aray = new Array();**Error** Scene=Scene 1, layer=actions, frame=1:Line 10: Statement block must be terminated by '}'
function parseXML(valid) {**Error** Scene=Scene 1, layer=actions, frame=1:Line 228: Syntax error.
- cereals0
your first error -
var cName:Aray = new Array();
should be
var cName:Array = new Array();
- cereals0
on line 152^
- unfittoprint0
check now http://pastebin.coconut.se/?id=4…
- snizl0
Getting close, now my sub info clip is not being attached to the popup (pop[x])
- snizl0
Is this a problem
for(var x:Number=0; x < 0; x++){
having x < 0; ??
- unfittoprint0
exactly
should be something like
var x:Number=1; x
- snizl0
I am still unfortunately having the problem of the sub attach being overwritten and only displaying the last one.
oi.
- snizl0
Could it possibly have somthing to do with my depths??
- snizl0
I've put comments into the as: http://pastebin.coconut.se/?id=4…
Isolating the code that is not working properly. Any ideas? Like I said the problem is duplicated in the sub clip and attaching it to the pops.