XML

 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Tutorialized ForumsWeb Design & DevelopmentXML

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old June 29th, 2006, 03:08 AM
kevinet kevinet is offline
Contributing User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Jun 2006
Posts: 5 kevinet New User: is a brand new recruit and a unknown entity at this point. 
Time spent in forums: < 1 sec
Reputation Power: 0
Reading navigation links from an XML file.

I am setting up a website that has a main navigation menu in a horizontal curved area. The links right now are simply static text with the URL to the file entered in the Properties panel. I need to have the links read from an external XML file instead. Do I need to use Dynamic text or Button actions? I need to know what Actionscript to attach to the links to read the URL to that particular website file from an XML file. I would appreciate any assistance with this matter.

Thanks,
Kevinet.

Reply With Quote
  #2  
Old June 29th, 2006, 06:23 PM
Sergiu_spooky Sergiu_spooky is offline
Contributing User
Tutorialized Novice (500 - 999 posts)
 
Join Date: Dec 2005
Location: Romania
Posts: 642 Sergiu_spooky New User: is a brand new recruit and a unknown entity at this point. 
Time spent in forums: 2 m 29 sec
Reputation Power: 0
Send a message via MSN to Sergiu_spooky Send a message via Yahoo to Sergiu_spooky
load the xml file, after it's loaded (myXML.onLoad = function(success { if(success) { )cycle through the nodes and return their attributes (label, link possibly).
then using those attributes returned, for each node call a function that creates you'r buttons.
it could look like this :
Code:
var i = 0;
function create_button(label,link) {
duplicateMovieClip("blank_button","button"+i,i);
_root["button"+i]._x = 40;
_root["button"+i]._y = i*20;
_root["button"+i].labelTXT.text = label;
_root["button"+i].onRelease = function(){
getURL(link,"_self");
}
i++;
}

"blank_button" is a movieClip on the root with the graphics for a button in it and a dynamic text box, instance name labelTXT with no text in it.
each button created will be aligned to _x = 40, each new button beeing created right under the next one (20 pixels down)

so for each xml node you would call create_button(node.attributes.label,node.attribute s.link);

Reply With Quote
  #3  
Old June 30th, 2006, 12:24 AM
kevinet kevinet is offline
Contributing User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Jun 2006
Posts: 5 kevinet New User: is a brand new recruit and a unknown entity at this point. 
Time spent in forums: < 1 sec
Reputation Power: 0
Reading navigation links from an XML file.

Thanks for the help. Much Appreciated.

Reply With Quote
Reply

Viewing: Tutorialized ForumsWeb Design & DevelopmentXML > Reading navigation links from an XML file.


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap