Reply LinkBack Thread Tools Search this Thread
Old 07-03-2007, 14:01   #1 (permalink)
sub
Shitcasket™
 
sub's Avatar
 
Join Date: Jul 2005
Location: Brighton
Posts: 3,578
Send a message via MSN to sub Send a message via Skype™ to sub
Setting URL links in Flash from HTML

Can anyone advise how I'd go about setting up a Flash file with a series of links to URLs (that currently do not exist) which can later be determined out-side of Flash.

Cheers.
__________________
  Reply With Quote
Old 07-03-2007, 14:30   #2 (permalink)
John Good
+
 
Join Date: May 2005
Location: Tropical Networks
Posts: 1,320
put your links in a XML
--
I'm in my bed with 1minute of power left, don't feel like going downstairs for power supply.
I'll post more tomorrow morning if necessary.
__________________
Fonts are like cologne: A bad choice speaks louder than a good one. Justin Feinstein
  Reply With Quote
Old 07-03-2007, 14:36   #3 (permalink)
Tanel
Registered User
 
Join Date: Jan 2007
Posts: 26
Xml is best solution. Search help from kirupa.com/developer/flash/index.htm#Server_Side_&_Flash
  Reply With Quote
Old 07-03-2007, 15:17   #4 (permalink)
sub
Shitcasket™
 
sub's Avatar
 
Join Date: Jul 2005
Location: Brighton
Posts: 3,578
Send a message via MSN to sub Send a message via Skype™ to sub
Appreciated. Looks a tad out of my depth (and project budget).
Will take a closer look when sober.
__________________
  Reply With Quote
Old 07-03-2007, 15:36   #5 (permalink)
lukasarts
Shiv.
 
lukasarts's Avatar
 
Join Date: Jul 2006
Location: Sunny Norfolk
Posts: 1,071
It's not so bad. Followed this the other day:

http://www.kirupa.com/web/xml/index.htm

And got some stuff up and running pretty quick.
__________________
  Reply With Quote
Old 07-03-2007, 21:15   #6 (permalink)
estazor
Registered User
 
estazor's Avatar
 
Join Date: Jan 2007
Posts: 74
Yea doing this in XML isn't hard. All you have to do is make up the XML document and then in flash load it in. Then, basically on whatever event you use the getURL() method to use that link that you're getting from XML.
  Reply With Quote
Old 08-03-2007, 04:47   #7 (permalink)
hit-squad
digital artist
 
hit-squad's Avatar
 
Join Date: May 2006
Location: plymouth. uk
Posts: 147
Send a message via MSN to hit-squad
yeah use getURL() to link urls loaded in via xml
  Reply With Quote
Old 08-03-2007, 04:56   #8 (permalink)
sub
Shitcasket™
 
sub's Avatar
 
Join Date: Jul 2005
Location: Brighton
Posts: 3,578
Send a message via MSN to sub Send a message via Skype™ to sub
Cheers lads. I'll take a good look into this as soon as this raging hangover eases off. Currently reading with bleeding eyes.
__________________
  Reply With Quote
Old 08-03-2007, 08:21   #9 (permalink)
John Good
+
 
Join Date: May 2005
Location: Tropical Networks
Posts: 1,320
Quote:
Originally Posted by hit-squad
yeah use getURL() to link urls loaded in via xml

brilliant !
__________________
Fonts are like cologne: A bad choice speaks louder than a good one. Justin Feinstein
  Reply With Quote
Old 08-03-2007, 08:47   #10 (permalink)
John Good
+
 
Join Date: May 2005
Location: Tropical Networks
Posts: 1,320
HTML Code:
//create an objet to manage your links _global.LinksManager = new Object(); LinksManager = _global.LinksManager; //define a link to a stage LinksManager.root = this; // LinksManager.init = function(){ //make an array for your links and one for the buttons this.tableLinks = []; this.tableButtons = [/*your button 1,your button 2 etc.. */] //load the XML this.loadData(); }; LinksManager.loadData = function (){ var vXML = new XML(); vXML.refLM = this;//this makes a pointer to the links manager vXML.ignoreWhite = true; // vXML.onLoad = function () { this.refLM.initLinks(this); }; vXML.load ("linksList.xml"); }; // LinksManager.initLinks = function (aXML){ for(var i=0; i < aXML.firstChild.childNodes.length; i++){ aXML.refLM.tableLinks[i] = aXML.firstChild.childNodes[i].firstChild.nodeValue; } this.applyLinks(); }; // LinksManager.applyLinks = function(){ for(var i=0; i < this.tableButtons.length; i++){ this.tableButtons[i].url = this.tableLinks[i]; } }; LinksManager.activateButtons = function(){ for(var i=0; i < this.tableButtons.length; i++){ this.tableButtons[i].onRelease=function(){ getURL(this.url, '_blank'); } } }; // LinksManager.init();

I did NOT re-read my code, and I did not comment really, but the code is explicit.
think you can handle that ;-)
__________________
Fonts are like cologne: A bad choice speaks louder than a good one. Justin Feinstein
  Reply With Quote
Old 08-03-2007, 08:57   #11 (permalink)
sub
Shitcasket™
 
sub's Avatar
 
Join Date: Jul 2005
Location: Brighton
Posts: 3,578
Send a message via MSN to sub Send a message via Skype™ to sub
Many thanks John.
This is very much appreciated.

__________________
  Reply With Quote
Old 08-03-2007, 09:05   #12 (permalink)
John Good
+
 
Join Date: May 2005
Location: Tropical Networks
Posts: 1,320
I'm not the helping kind, I do this only for karma.
__________________
Fonts are like cologne: A bad choice speaks louder than a good one. Justin Feinstein
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8