StevieGuy9
Programmer
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();
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();