sean1983uk
06-19-2007, 03:26 PM
When i use ctrl & enter to preview my flash movie all the movieclips work onRollOver (a popup info box is displayed) etc.
When i publish it or put it into a html page in dreamweaver the movieclips no longer display the popup window, but the cursor does change to a hand so it is recognising its a movieclip.
Any idea's why this would be?
Below is the code I'm using:
////////// Club ID's //////////
rollover1_mc.id = 138;
rollover2_mc.id = 139;
rollover3_mc.id = 140;
rollover4_mc.id = 141;
rollover5_mc.id = 1595;
rollover6_mc.id = 1580;
rollover7_mc.id = 142;
rollover8_mc.id = 1263;
rollover9_mc.id = 1076;
rollover10_mc.id = 1583;
////////// Display Info //////////
for(i=1; i<220; i++){
this["rollover"+ i +"_mc"].onRollOver = displayContent;
}
////////// Remove Info //////////
for(i=1; i<220; i++){
this["rollover"+ i +"_mc"].onRollOut = removeContent;
}
////////// Open Link //////////
for(i=1; i<220; i++){
this["rollover"+ i +"_mc"].onRelease = function(){
getURL("http://www.google.co.uk"+pageurl);
};
}
function displayContent():Void {
// get list of clubs
var clubList:Array = xmlNode.childNodes;
for (var i:Number = 0; i<clubList.length; i++) {
if (clubList[i].attributes.id == this.id) {
openInfo();
popout1.clubName = clubList[i].attributes.name;
popout1.add1 = clubList[i].attributes.address1;
popout1.add2 = clubList[i].attributes.address2;
popout1.add3 = clubList[i].attributes.address3;
popout1.add4 = clubList[i].attributes.address4;
pageurl = clubList[i].attributes.pageurl;
break;
}else{
openInfo();
popout1.popoutClick._alpha = 0;
popout1.clubName = " No Information";
popout1.add1 = " avaliable at";
popout1.add2 = " the current time";
popout1.add3 = "";
popout1.add4 = "";
}
}
}
////////// Open Popout Box //////////
function openInfo() {
attachMovie("popout", "popout1", 1);
popout1._x = _xmouse;
popout1._y = _ymouse-popout1._height/2;
}
////////// Remove Popout Box /////////
function removeContent():Void {
removeMovieClip("popout1");
}
////////// Load XML //////////
function loadXML(success:Boolean):Void {
if (success) {
xmlNode = findNode(this, "teams");
} else {
trace("** XML File Not Loaded **");
}
}
var xmlData:XML = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("clubs.xml");
////////// FindNode //////////
function findNode(node, nodeName) {
if (node.nodeName == nodeName) {
return node;
}
for (var i = 0; node.childNodes && i<node.childNodes.length; i++) {
var foundNode = findNode(node.childNodes[i], nodeName);
if (foundNode != null) {
return foundNode;
}
}
return null;
}
Any advice appreciated.
Sean
When i publish it or put it into a html page in dreamweaver the movieclips no longer display the popup window, but the cursor does change to a hand so it is recognising its a movieclip.
Any idea's why this would be?
Below is the code I'm using:
////////// Club ID's //////////
rollover1_mc.id = 138;
rollover2_mc.id = 139;
rollover3_mc.id = 140;
rollover4_mc.id = 141;
rollover5_mc.id = 1595;
rollover6_mc.id = 1580;
rollover7_mc.id = 142;
rollover8_mc.id = 1263;
rollover9_mc.id = 1076;
rollover10_mc.id = 1583;
////////// Display Info //////////
for(i=1; i<220; i++){
this["rollover"+ i +"_mc"].onRollOver = displayContent;
}
////////// Remove Info //////////
for(i=1; i<220; i++){
this["rollover"+ i +"_mc"].onRollOut = removeContent;
}
////////// Open Link //////////
for(i=1; i<220; i++){
this["rollover"+ i +"_mc"].onRelease = function(){
getURL("http://www.google.co.uk"+pageurl);
};
}
function displayContent():Void {
// get list of clubs
var clubList:Array = xmlNode.childNodes;
for (var i:Number = 0; i<clubList.length; i++) {
if (clubList[i].attributes.id == this.id) {
openInfo();
popout1.clubName = clubList[i].attributes.name;
popout1.add1 = clubList[i].attributes.address1;
popout1.add2 = clubList[i].attributes.address2;
popout1.add3 = clubList[i].attributes.address3;
popout1.add4 = clubList[i].attributes.address4;
pageurl = clubList[i].attributes.pageurl;
break;
}else{
openInfo();
popout1.popoutClick._alpha = 0;
popout1.clubName = " No Information";
popout1.add1 = " avaliable at";
popout1.add2 = " the current time";
popout1.add3 = "";
popout1.add4 = "";
}
}
}
////////// Open Popout Box //////////
function openInfo() {
attachMovie("popout", "popout1", 1);
popout1._x = _xmouse;
popout1._y = _ymouse-popout1._height/2;
}
////////// Remove Popout Box /////////
function removeContent():Void {
removeMovieClip("popout1");
}
////////// Load XML //////////
function loadXML(success:Boolean):Void {
if (success) {
xmlNode = findNode(this, "teams");
} else {
trace("** XML File Not Loaded **");
}
}
var xmlData:XML = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("clubs.xml");
////////// FindNode //////////
function findNode(node, nodeName) {
if (node.nodeName == nodeName) {
return node;
}
for (var i = 0; node.childNodes && i<node.childNodes.length; i++) {
var foundNode = findNode(node.childNodes[i], nodeName);
if (foundNode != null) {
return foundNode;
}
}
return null;
}
Any advice appreciated.
Sean