Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open in Parent Frame? Help!

Status
Not open for further replies.

StevieGuy9

Programmer
Jan 19, 2004
3
US
I have the SWF in a iFrame on my homepage and every link on the SWF when clicked will open in the iFrame, which I dont want. And t.readMore = storyNodes[node].attributes.readMore; is for all the links. I can't just add _parent, so I was hoping someone could help me figure out what to do. Heres the whole ActionScript coding:

function startStory(success) {
if (success) {
storyNodes = story_xml.firstChild.childNodes;
changeStory((pos - 1));
node = storyNodes.length - 1;
thumb_x = -105;
loadThumbs();
} else {
headlines.headline = "Error opening XML file.";
}
}
function loadThumbs() {
var i = -1;
while (i < (storyNodes.length + 5)) {
if (node == storyNodes.length) {
node = 0;
}
thumbs.attachMovie("thumb", ("thumb" + (i + 1)), (i + 1));
t = eval(("thumbs.thumb" + (i + 1)));
t._x = thumb_x;
loadMovie(storyNodes[node].attributes.thumbURL, "t.image");
t.image._xscale = 99;
t.image._yscale = 99;
t.readMore = storyNodes[node].attributes.readMore;
node++;
thumb_x += 105;
i++;
}
delete t;
}
function changeStory(num) {
var Register_1_ = num;
loadSWF(storyNodes[Register_1_].attributes.imageURL);
headlines.headline.htmlText = ((("<b>" + storyNodes[Register_1_].attributes.headline) + "</b>
<font size=\"14\">") + storyNodes[Register_1_].attributes.strapline) + "</font>";
storyURL = storyNodes[Register_1_].attributes.readMore;
}
function loadSWF(path) {
_root.gotoAndPlay("loadLoop");
loadMovie(path, "topImage");
_root.onEnterFrame = rootOEF();
}
function rootOEF() {
var Register_1_ = topImage.getBytesTotal();
var Register_3_ = topImage.getBytesLoaded();
var Register_2_ = Register_3_ / Register_1_ * 100;
if (Register_2_ == 100) {
_root.gotoAndPlay("loaded");
delete _root.onEnterFrame;
}
}
if (mode == null) {
mode = "1";
}
if (storyxml == null) {
storyxml = "xmltest.xml";
} else {
storyxml = (storyxml + "?") + random(65000);
}
story_xml = new XML();
story_xml.onLoad = startStory;
story_xml.load(storyxml);
story_xml.ignoreWhite = true;
node = 0;
thumb_x = 0;
pos = 1;
storyNodes = new Array();
 
What is the value of "readMore" in your XML document?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top