A Flash Developer Resource Site

Results 1 to 20 of 30

Thread: hyperlinks in XML...?

Hybrid View

  1. #1
    Member
    Join Date
    Feb 2005
    Location
    manchester, england
    Posts
    98
    hi logix

    sorry i didn't reply... my email notifications don't work, so i have to manually check my subscriptions (i've informed the moderators but no response as yet)...

    but glad to hear you got it working!!

  2. #2
    Senior Member
    Join Date
    Jan 2001
    Location
    Copenhagen
    Posts
    192
    If anyone could help me out, please. I don't understand how to make links in a xml. And I've read through a lot of post and some of the links here. Most of them used an older flash player and thus didn't work with mine. So far it has been quite easy to work in xml and Flash but I'm completely lost in thi case. Here's my code for my xml file. I use flashplayer 7 and as 2.0:

    Code:
    stop();
    container.stop();
    var timeline = this;
    System.useCodepage = true;
    var loader2:XML = new XML();
    loader2.load("files/Filer/Flash/overskrift.xml");
    loader2.ignoreWhite = true;
    loader2.onLoad = function() {
    	_global.rod2 = this.firstChild.childNodes;
    	var antalXML:Number = rod2.length-1;
    	setter(0);
    };
    
    setter = function (id) {
    	timeline.container_overskrift.overskrift.text = rod2[id].firstChild.firstChild.nodeValue;
    	timeline.container_overskrift.overskrift.autoSize = true;
    	timeline.container_overskrift.overskrift.multiline = true;
    };
    
    function randRange(min:Number, max:Number):Number {
    	var randomNum:Number = Math.floor(Math.random()*(max-min+1))+min;
    	return randomNum;
    }
    
    var loader:XML = new XML();
    loader.load("files/Filer/Flash/tekst.xml");
    loader.ignoreWhite = true;
    loader.onLoad = function() {
    	_global.rod = this.firstChild.childNodes;
    	var antalXML:Number = rod.length-1;
    	for (i=0; i<1; i++) {
    		var randomNumber:Number = randRange(0, antalXML);
    	}
    	setter2(randomNumber);
    };
    
    setter2 = function (id) {
    	timeline.container.holder.tekst1.text = rod[id].firstChild.firstChild.nodeValue;
    	timeline.container.holder.tekst1.multiline = true;
    	timeline.container.holder.tekst2.text = rod[id].firstChild.nextSibling.firstChild;
    	timeline.container.holder.tekst2.multiline = true;
    	container.play();
    	_global.antal = id;
    };
    Regards
    Michael

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center