Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking to xml rows from two different swf's

Status
Not open for further replies.

dlivadpg

MIS
Feb 3, 2005
6
US
Hey Guys,

Is there any way to link a button within flash to go to a specific record in a XML file loaded by a second swf? I have an XML file that has articles, and I display the titles of the top three current ones on the main page. Is there a way to go to the specific article based on what link is pressed?

Any help would be appreciated...

thanks
 
how are you displaying the records (datagrid or combo or list box etc) and which version of flash.... mx or 2004
 
just pass the node name you want to load as a query string and have the second swf loop through the node names until it finds the match

can post some code if you display structure of xml file
 
thanks alot for your help, here is the XML code structure I have been using:

<news>
<article>
<image>images/article1.jpg</image>
<title>Article 1</title>
<desc>Article goes here</desc>
<caption>Article Image Caption</caption>
</article>
<article>
<image>images/article2.jpg</image>
<title>Article 2</title>
<desc>Article goes here</desc>
<caption>Article Image Caption</caption>
</article>
</news>
 
Ok...I get how to loop the second swf until it gets the value. What I do not get is how to send the node with the query string. Is it as simple as:

on (release){
loadMovie("news.swf?node=1");
}
 
sorry i hoped to have time to give you a comlete solution but time runs on and the bar may run out of beer [unlikely but why take the chance]


you are on the right lines as far as passing the parameter is concerned

if the xml file is small then just loop through the childnodes until you hit a match

if its large then you will want to alter the structure of the xml file

there is an excellent xml post....with maybe 70+ replys to trawl through on the board right now

if that still dont solve the problem then hangover permitting i will put an example togther in the morning
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top