Jump to content

PHP/Flash linking


Keanu

Recommended Posts

Hey,

Basically... I like to use php linking.. Like... the whole...

 

Code:

index.php?load=home

 

Because I heard its the safest way of linking.. So I want to add it to my newest site.. But through flash.. Basically.. The flash files have got the links in them... So when you click it goes to the page.. Thats all sorted out for sure...

 

In the flash files its got for one of the links...

 

 

Code:

link.php?page=About

 

And my main page is index.php

 

On my index.php at the very top, just after <body> I'v got the following...

 

 

Code:

<?

include('link.php');

?>

 

And on my link.php iv got this in it...

 

Code:

<?php

$page = $_GET['id'];

switch($page){

case 'Home':

include("index.php");

break; //break in the script so you can start a new one

 

case 'About': //sets the name that will be shown in the address bar when you click the "Staff" link.

include("index-1.html"); //sets the staff page notice it is different than the case so people don't know your page

break; //breaks the script so you can start a new case

 

case 'Services':

include("index-2.html");

break;

 

case 'Solutions':

include("index-3.html");

break;

 

case 'Support':

include("index-4.html");

break;

 

case 'Contacts':

include("index-5.html");

break;

}

?>

So what I want to do... Is pretty much this:

 

Index.php runs,

click on link on head.swf,

head.swf opens link in the same page..

 

Just like the whole;

 

 

Code:

<a href="info.html">something</a>

But opens in a new page... (Can't remember the code)

 

If anyone can help me, that'd be grand!

 

Thanks in advance!

-Keanu

Link to comment
https://forums.phpfreaks.com/topic/47231-phpflash-linking/
Share on other sites

Keep in mind that Flash is geared to be dynamic with the server in itself, without page reloading. This really kills the idea of using the dynamic URLs for flash integration. However, when your Flash movie initially loads, you can pass in variables through the URL as you suggest, and then access it through the _root scope in your presentation.

Link to comment
https://forums.phpfreaks.com/topic/47231-phpflash-linking/#findComment-230336
Share on other sites

Umm... I didn't create the flash? This is a bought template.. I just recently found out that I could change the URL's...

 

All Im looking to do is have it so that it doesn't show the proper name for the file in the address bar.. So it shows something like..

 

site.com/about

or

site.com/index.php?load=about

or...

 

Just doesn't change the link at the top... So the link at the top stays as something like...

 

 

Link to comment
https://forums.phpfreaks.com/topic/47231-phpflash-linking/#findComment-230359
Share on other sites

The only way you're going to be able to have a single URL with your content for all different pages in it is to be able to pass the page request through $_GET so it's invisible to the URL. There is no way that you can avoid having some sort of URL modification otherwise. The only other option is to have the site entirely done up in flash so that you're simply skipping to another section within the flash movie instead of to another page.

Link to comment
https://forums.phpfreaks.com/topic/47231-phpflash-linking/#findComment-233161
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.