This content has been marked as final. Show 8 replies
For the first case you described, you could try...
load_txt.text = _root.array ;
assuming array holds the text you intend to write into that textfield.
Yah, I tried that and no luck - I keep getting an "undefined" in the load_txt text box.
Below is some more of the code that I'm using to store the addresses into the array, and as you can see in the addMarkers function, I'm running a trace on addressA which DOES work (it shows the individual address in the trace - which is what I want loaded into the text boxes of the embedded swf file).
I'm stumped! I would think that if it can trace EXACTLY what I want it to trace it should be able to load it into the embedded swf...or maybe I keep getting "undefined" as my return result in embed.swf because I'm trying to load the addressA outside the addMarkers or parseXML function.
I just tried putting the following AS into the embed.swf file, and when I SPECIFY which part of the array I get that to show, but that value shows for every instance of the embed.swf load_txt box.
load_txt.text = _root.addressA;
load_txt.text = _root.addressA;
From this logic it doesn't make sense for it to not load it in a variable instance of markeraddy_txt.text = _root.addressA ; when it embed.swf is called for to create an instance of it (at the request of addressA).
I might go crazy with this! Sometimes I just try to work way beyond what I'm capable of!
I just tried
myMap.load_txt.text = addressA ;
where "myMap" is the instance name of the map where I am overlaying/inserting the embedded swf file, but that too did not work.
Darn this yahoo! map - I thought it would be easier to use!
Again, it does trace the addresses properly and does show a specific address from array if I tell it to (load_txt.text = _root.addressA;) but will not work if I try to run it as an increasing variable...which is what I want because I don't want to have EVERY instance of the embedded swf to have the same addressText
I guess I'm not clear on the scenario overall.
Are there swf's embedded within myMap that contain the textfields (one each) that you are trying to fill? If so, what code do you use to load those swf's?
What I'm doing is using a yahoo map to load addresses and place custom swf files as the placemarkers. The main stage has an instance of myMap, which is the map that yahoo sets us to display the ACTUAL map. They have also provided coding for placing markers on the map, which is what I'm using.
I have the addresses throughout multiple xml files, which I am actually loading through 1 single xml file. These addresses are being stored in an array, then called by the AS below to place markers. All the markers are placed correctly, however, I am trying to have them actually say the address - this is where the problem lies.
The marker that is being located and placed has a text field called load_text in it. I want that field to load the same address that is being used to place it (from the array addressA).
I'm very confused because every loop through the * for (i=0; i<addressA.length; i++) * loop the marker is placed at the correct addressA location, but I cannot actually get the address to load into the load_txt field in the marker. I can even run a trace during that loop and it traces addressA for each address, but I can't seem to actually load those values into the load_txt box.
Do you have any ideas?
I'm looking for a handle on the embedded swf's. If those are what hold the textfields, then those are what need to be targeted. That's why I'm wondering about how (the code) these embedded swf's get loaded in. I can see some function being called that probably does this (addMarkerByAddress), but I can't see the function itself. Somewhere in that function there oughta be something that provides some form identifier that can be used to target them.
Hmm...I see what you're saying. I don't know if this helps, but this is the link to the Yahoo! Maps Web Services - Flash® APIs Reference Manual Link.
I'll keep searching online to see if there is anything else that might be useful!
EDIT: I just found this page, and I've got it! Finally! Thanks for all the help guys/girls - I wouldn't have been able to get this far without you!! Link