Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    Regular Coder sitNsmile's Avatar
    Join Date
    Dec 2009
    Location
    Charlotte, NC
    Posts
    358
    Thanks
    19
    Thanked 2 Times in 2 Posts

    loading external image - AS2

    Code:
    function processXMLData(success)
    {
    	if (success)
    	{
    	    //var banner = new MovieClipLoader();
    		var rootNode = this.firstChild;
    		var img = getValue(findNode(rootNode, "image"));
    		var url = getValue(findNode(rootNode, "link"));
    		
    		// this isnt displaying the image in the swf
    		b1.loadMovie(img,1);
    		
    		trace(img);
    		trace(url);
    	}
    	else
    	{
    		trace("error");
    	}
    }
    
    var xmlData=new XML();
    xmlData.ignoreWhite=true;
    xmlData.load("http://mydomain.com/file.xml");
    xmlData.onLoad=processXMLData;
    Trying to figure why this doesnt work. However when i replace "img" with a real http url it works fine, but when i load the image url off xml, it doesnt render. any ideas?
    Last edited by sitNsmile; 03-09-2012 at 08:57 PM.


 

Posting Permissions

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