Keanu Posted April 16, 2007 Share Posted April 16, 2007 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 More sharing options...
trq Posted April 16, 2007 Share Posted April 16, 2007 If anyone can help me, that'd be grand! Do what? You never state your problem. Link to comment https://forums.phpfreaks.com/topic/47231-phpflash-linking/#findComment-230331 Share on other sites More sharing options...
Keanu Posted April 16, 2007 Author Share Posted April 16, 2007 >.> I'm trying to link through flash to php.. Yet.. I really need help.. Because I have no idea.. All I want to do is for it to change a page on each link.. But show index.php?load=About Or something like that? Thanks in advance! -Keanu Link to comment https://forums.phpfreaks.com/topic/47231-phpflash-linking/#findComment-230335 Share on other sites More sharing options...
obsidian Posted April 16, 2007 Share Posted April 16, 2007 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 More sharing options...
Keanu Posted April 16, 2007 Author Share Posted April 16, 2007 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... http://www.sitename.com Link to comment https://forums.phpfreaks.com/topic/47231-phpflash-linking/#findComment-230359 Share on other sites More sharing options...
Keanu Posted April 19, 2007 Author Share Posted April 19, 2007 Any suggestions anyone?.... I know this might not count as php... It might be javascript... >.> Link to comment https://forums.phpfreaks.com/topic/47231-phpflash-linking/#findComment-233154 Share on other sites More sharing options...
obsidian Posted April 19, 2007 Share Posted April 19, 2007 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.