free flash templates forum

free flash templates forum (http://forum.freenicetemplates.com/index.php)
-   Free flash templates (http://forum.freenicetemplates.com/forumdisplay.php?f=2)
-   -   [SOLVED] Need help to link a page on the flash buttons (http://forum.freenicetemplates.com/showthread.php?t=60)

pepito 06-08-2009 01:51 AM

Need help to link a page on the flash buttons
 
myButton('HOME','_home.htm'); I´m supposed to change the name of the button and then how can I link a page to open on a different one?

myButton('BEBE','www.sample/bebe.htm'); <--------is this the way to do it???:confused:

freenicetemplates 06-08-2009 12:28 PM

link to external website with flash buttons
 
You can open main.js and insert these lines at begining of showContent function (line 9) :

if (contentString.indexOf("http") != -1)
{
location.href=contentString;
return true;
}

pepito 06-09-2009 06:05 AM

this is what the buttons will be going to
 
the script look like this:

<script type="text/javascript">

myButton('HOME','_home.htm');

myButton('ABOUT','_about.htm');

myButton('MY PORTFOLIO','1','_about.htm');

myButton('NEWS','_news.htm');
myButton('CONTACT US','_contact.htm');

</script>

th buttons first and last will stay and work as ther are made for,

but the second third and forth buttons will be looking like this and the will need to go to a different page.


myButton('HOME','_home.htm'); THIS ONE REMAINS

myButton('GALERIA','_about.htm'); THIS ONE GOES TO http://www.cabotroopers.com/galeria/index.php

myButton(MIEMBROS','_about.htm'); THIS ONE GOES TO http://www.cabotroopers.com/miembros/index.php

myButton('FORO','_news.htm'); THIS ONE GOES TO http://www.cabotroopers.com/foro/index.php
myButton('CONTACT US','_contact.htm'); AND THIS ONE REMAIN THE SAME


I will really appreciate your help us out, I will study much more from now on sorry about my bad english as well

freenicetemplates 06-09-2009 08:37 PM

flash buttons
 
Do exactly what i tell you in my last post and everything should work as you expect to.

pepito 06-10-2009 03:29 PM

I inserted the lines as you tolded me and now the home page doesn´t work what can I do??? The lines in red are the ones I inserted at the begining of line 9

jQuery(document).ready(function(){
hideContent = function(contentString){
jQuery("div.dynamicContent").fadeOut( 1000 ,function() {
showContent(contentString);playSound(0);
});
};
if (contentString.indexOf("http") != -1)
{
location.href=contentString;
return true;
}

showContent = function (contentString) {
jQuery.ajax({
type: "GET",
url: contentString,
dataType:"html",
success: function(data){
jQuery("div.dynamicContent").html(data);
jQuery("div.dynamicContent").slideDown(1000);
},
error: function () {
alert("Page "+contentString+" not found");

freenicetemplates 06-10-2009 03:53 PM

flash buttons
 
Change :



if (contentString.indexOf("http") != -1)
{
location.href=contentString;
return true;
}

showContent = function (contentString) {
jQuery.ajax({
type: "GET",
url: contentString,
dataType:"html",
success: function(data){
jQuery("div.dynamicContent").html(data);
jQuery("div.dynamicContent").slideDown(1000);
},
error: function () {
alert("Page "+contentString+" not found");





by:

showContent = function (contentString) {
if (contentString.indexOf("http") != -1)
{
location.href=contentString;
return true;
}

jQuery.ajax({
......


All times are GMT. The time now is 04:57 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.