Problems loading news content through external SWF

What up everybody, I hope someone can help me on this problem I’ve been workin on for the past week… I’ve tried different things to fix this but no luck…

The news content loads up perfectly fine when u pull up the swf directly… for example:
http://flaremedia.com/dalab/ral/newz02.swf

but once its being loaded through the mainframe, we start having issues…
http://flaremedia.com/dalab/ral/home.html
Click on the News button

Here’s the link to download the News FLA file:
http://flaremedia.com/dalab/ral/news.fla

Now I know this could be something simple such as Path Issues… but I’ve never been 2 much of a code guy, but I would greatly appreciate if someone would drop some knowledge on this matter… Thank you.

JH

you probably want to make sure all your variables are reffered to within the local timeline. in other words, dont use _root, cause when u load your swf into another swf _root becomes the main timesline of loading swf. So if you refer to all your variables as this, then all ur variables should stay local to your loaded swf.

Did that make any sense, cause it didnt to me… :huh: :smiley:

Ok I knew it had something to do with the _root it in the actionscript… so now my question is… do I go through all the action script and delete the _root out of it, or do I replace it with something else?

For example here is some of the code from the actionscript of the news scroller:
stop();
this._lockroot = true;
_root.topPlay = true;

newsTitle = new Array();
newsText = new Array();
newsImg = new Array();
newsUrl = new Array();

xmlStr=new String(xml);
if(xmlStr==“undefined”)
xml=“config.xml”;

// xml parser
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.load(xml+"?"+(new Date()).getTime());
//xmlData.load(xml);

xmlData.onLoad = function(success) {

// get configuration string
config = this.firstChild.firstChild;


_root.titleFace = config.childNodes[0].childNodes[0].firstChild.nodeValue;    
_root.titleColor = "0x"+config.childNodes[0].childNodes[1].firstChild.nodeValue;    
_root.titleDecoration = config.childNodes[0].childNodes[2].firstChild.nodeValue;

_root.fontTopFace = config.childNodes[1].childNodes[0].firstChild.nodeValue;    
_root.fontTopSize = config.childNodes[1].childNodes[1].firstChild.nodeValue;
_root.fontTopColor = "0x"+config.childNodes[1].childNodes[2].firstChild.nodeValue;    
_root.fontDecoration = config.childNodes[1].childNodes[3].firstChild.nodeValue;    

// target window of the url
_root.targetTop = config.childNodes[2].childNodes[0].firstChild.nodeValue;    
// font color when the mouse is over the link
_root.aTitleColor = "0x"+config.childNodes[2].childNodes[1].firstChild.nodeValue;
_root.aTextColor = "0x"+config.childNodes[2].childNodes[2].firstChild.nodeValue;

_root.bgInColor = "0x"+config.childNodes[3].childNodes[0].firstChild.nodeValue;    
_root.bgOutColor = "0x"+config.childNodes[3].childNodes[1].firstChild.nodeValue;
_root.animBgInColor = "0x"+config.childNodes[3].childNodes[2].firstChild.nodeValue;    
_root.animBgOutColor = "0x"+config.childNodes[3].childNodes[3].firstChild.nodeValue;
_root.imgBgColor = "0x"+config.childNodes[3].childNodes[4].firstChild.nodeValue;
_root.stageBgColor = "0x"+config.childNodes[3].childNodes[5].firstChild.nodeValue;
// delay
_root.delay = config.childNodes[4].firstChild.nodeValue;    

// news
news = config.childNodes[5];
for(i=0;i<news.childNodes.length;i++) {
        j=0;
    // get the news title
    if(news.childNodes*.childNodes[0].nodeName ne "title") 
        newsTitle* = "null";
    else {
        newsTitle* = news.childNodes*.childNodes[j].firstChild.nodeValue;
        j++;
    }
    // get the news text
    if(news.childNodes*.childNodes[j].nodeName ne "text") 
        newsText* = "null";
    else {
        newsText* = news.childNodes*.childNodes[j].firstChild.nodeValue;
        j++;
    }
    // get the news image
    if(news.childNodes*.childNodes[j].nodeName ne "img") 
        newsImg* = "null";
    else {
        newsImg* = news.childNodes*.childNodes[j].firstChild.nodeValue;
        j++;
    }
    
    newsUrl* = news.childNodes*.childNodes[j].firstChild.nodeValue;
    if(newsUrl*.indexOf("@") != -1)
        newsUrl* = "mailto:"+newsUrl*;
}

play();

}

So what would I have to do to fix the paths in this code?

Thanks

was just looking up that _lockroot thing, seams that should solve your problem. But seeing as youve got it there, and its still not working, im not sure. I will take a look at your fla, and see what i can work out.

EDIT:
Try placing _this.lockroot on the very first frame on the main timeline.

i think it should be placed on the newz02 timeline and not the main timeline

I tried aussie’s and Gupps suggestions, but it didn’t work… I put it in the very first frame of the News timeline… the actual news ticker script is inside a movieclip in the News section… am I missing something here??

try putting it inside that movie clip

Inside that movieclip… the first 2 keyframes has actions…

the first keyframe actions starts off looking like this:
stop();
this._lockroot = true;
_root.topPlay = true;

newsTitle = new Array();
newsText = new Array();
newsImg = new Array();
newsUrl = new Array();

then the second keyframe actions starts off looking like:
stop();

// set the new parameters
aColor = new Color(bg.bgIn);
aColor.setRGB(_root.bgInColor);

What should I do? I know it has to be something really simple.

:skull: