Ok so I am trying to get my menu to link in flash and I found this tutorial and I have the code working perfectly, no errors are coming up in flash anymore but when I test the movie the buttons won't do anything or go anywhere. Is there something else I need with this code? Here are the codes I am using.
Flash Code
PHP Code:
textFile = new LoadVars()
textFile.onLoad = function(){
buttonlink1 = this.link1;
buttonlink2 = this.link2;
buttonlink3 = this.link3;
buttonlink4 = this.link4;
}
textFile.load("mylink.txt");
btn1.onRelease = function(){
getURL(buttonlink1, "name_txt");
};
btn2.onRelease = function(){
getURL(buttonlink2, "name_txt");
};
btn3.onRelease = function(){
getURL(buttonlink3, "name_txt");
};
btn4.onRelease = function(){
getURL(buttonlink4, "name_txt");
};
name_txt is the name of the text box on the flash page that I am trying to get the pages to load into. I thought maybe that was the problem and tried changing that part to _self but still nothing.
txt document
HTML Code:
&link1=/pgone.xml
&link2=/pgtwo.xml
&link3=/pgthree.xml
&link3=/pgfour.xml
I thought maybe the xml files could be the problem and tried changing those to an actual url and still nothing.
I don't really want to give up on these links because it is the closest I have gotten yet to having these links working.
Any help would be greatly appreciated
Oh and here is the original code for flash
PHP Code:
textFile = new LoadVars()
textFile.onLoad = function(){
buttonlink1 = this.link1;
buttonlink2 = this.link2;
buttonlink3 = this.link3;
}
textFile.load(\”mylink.txt\”); // mylink.txt is your external text file
//—actionscript for buttons
//—make sure you have all your buttons instance name added. btn1, btn2 and btn3.
btn1.onRelease = function(){
getURL(buttonlink1, \”_self\”);
};
btn2.onRelease = function(){
getURL(buttonlink2, \”_self\”);
};
btn3.onRelease = function(){
getURL(buttonlink3, \”_self\”);
};
I had to remove the \ because I get this error when they are there... Operator '=' must be followed by an operand. and ')' or ',' expected. so I tried to change the \ to a \\ and got the same errors.