need a flash audio .swf to play with php includes

Discussion in 'PHP' started by js09, Aug 12, 2009.

  1. #1
    i'm using includes in my main page that i have a flash audio (.swf) player

    the music play when you immediately visit the site..

    the php include code is this:
    <?PHP
    	if(isset($_GET['page'])) {
    		$Page = $_GET['page'];
    		if($Page == 'about') {
    			include('about.php');
    		}
    		elseif($Page == 'weddings') {
    			include('weddings.php');
    		}
    		elseif($Page == 'people') {
    			include('people.php');
    		}
    		elseif($Page == 'corporate') {
    			include('corporate.php');
    		}		
    		elseif($Page == 'food') {
    			include('food.php');
    		}
    		elseif($Page == 'events') {
    			include('events.php');
    		}	
    		elseif($Page == 'services') {
    			include('services.php');
    		}	
    		elseif($Page == 'testimonials') {
    			include('testimonials.php');
    		}	
    		elseif($Page == 'pricing') {
    			include('pricing.php');
    		}	
    		elseif($Page == 'contact') {
    			include('contact.php');
    		}	
    		elseif($Page == 'audio') {
    			include('audio.php');
    		}	
    		else {
    		include('home.php');
    		}
    	}
    	else {
    	include('home.php');
       }
    ?> 
    Code (markup):
    so when i navigate away from the home page, for example click on 'about'

    ?page=about
    Code (markup):
    the audio begins to play again.

    i just need it to continuously play in the background, but with the pause/next buttons still available at the top (embedded into the main page)

    thanks for the help
     
    js09, Aug 12, 2009 IP
  2. Tectonicz

    Tectonicz Peon

    Messages:
    88
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    On the included page which contains the music player code, does the music player autoplay and does it have the the pause/next buttons?.

    Just wondering, to see if this is a problem with you including, or a problem with your player.
     
    Tectonicz, Aug 12, 2009 IP
  3. js09

    js09 Peon

    Messages:
    232
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    well the code for the music player is on the main index page. and yeah it has play/stop buttons
     
    js09, Aug 12, 2009 IP
  4. joxtechnology

    joxtechnology Peon

    Messages:
    146
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    if you want your music to continously playing when you click on other page you must use ajax so that the whole page does not reload, just the content area
     
    joxtechnology, Aug 12, 2009 IP
  5. js09

    js09 Peon

    Messages:
    232
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    eek, doesn't sound like fun. mind pointing me in the right direction?
     
    js09, Aug 12, 2009 IP
  6. js09

    js09 Peon

    Messages:
    232
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    i tried adding an iframe at the top

    <iframe src ="audio.php" width="100%" height="200"><p>Your browser does not support iframes.</p>
    </iframe>
    Code (markup):
    but the music STILL starts over when you click a link on the main page

    any ideas?
     
    js09, Aug 14, 2009 IP
  7. js09

    js09 Peon

    Messages:
    232
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    still need some help :|
     
    js09, Aug 16, 2009 IP