Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Linking Multiple swf's to an Embedded player

    All I want to do is have one page with links to another page that has an embedded player on it so I can have the player controls. I know how to link straight to the swf but will no controls.
    The first page will have a tree style menu with links to about 120 swf tutorial videos, the menu I can do.
    What I can't get my head around is what do I put in the link (on the first page) to tell the player what video to play and what to put on the second page so the player knows what swf play.
    I just want to organize my files to disc with an web page interface.
    Any help would be good, I have be reading the web for the last month and now have brain fade.
    Thanking you, Ken

  • #2
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    One of the easiest ways would be to have the first page with the links, and the second page can be a php (or any other kind of server language) file to accept a variable through the URL, and then it can output it into the embed code.

    So page 1)

    Code:
    <a href="view.php?id=2.swf">View SWF 1</a>
    And then on the view.php page you'd get the variable and just have it output into the embed code.
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #3
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks Jeremy for your reply.
    Could you please go into more detail about what to put on the second page.

    thanking you,

    ken

  • #4
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    Assuming you have PHP it would be something like this

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
      <head>
        <title>SWFObject Example</title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <script type="text/javascript" src="swfobject.js"></script>
    
        <script type="text/javascript">
        swfobject.registerObject("swfplaceholder", "9.0.0", "expressInstall.swf"); // First parameter: name of Object ID, Second parameter: Minimum Flash version, Third Parameter: 
        </script>
    
      </head>
      <body>
        <div>
    
          <object id="swfplaceholder" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="780" height="420">
    
            <param name="movie" value="<?php echo $_GET['id']; ?>" />
            <!--[if !IE]>-->
            <object type="application/x-shockwave-flash" data="<?php echo $_GET['id']; ?>" width="780" height="420">
            <!--<![endif]-->
              <p>Alternative content</p>
            <!--[if !IE]>-->
            </object>
            <!--<![endif]-->
          </object>
        </div>
      </body>
    </html>
    <?php echo $_GET['id']; ?> is what gets the swf name from the URL as I put it above.
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #5
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Jeremy,
    Thank you for trying to help me, I 'm new to all this script stuff.
    When you said "Assuming you have PHP" what did you mean. What I've read lately that has something to do with a server? What I want to do will not be go online but to disc so will what you are trying to teach me work on a disc?

    Thanking you,
    Ken

  • #6
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    What I mean is that you have to find out if your hosting provider allows you to use PHP. Most do, some do not.

    I think you might need to jump a little into PHP to understand what I'm talking about. There is a great tutorial video series here that can help.

    http://net.tutsplus.com/videos/scree...-video-series/
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #7
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Jeremy,
    They were great tutorials, wish there were more like them.
    I have realized that PHP is not the script that will do what I
    e.g To put the pages and videos on to a dvd disc and use the functions
    offline.
    Do you know what script would do that?

    Thanking you,

    Ken

  • #8
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    Oh...that would have been helpful to know up front.

    Yes PHP won't work with CDs.

    So you plan on putting the files on a DVD and have them use a browser to view them? I suppose you might have to go poking around in the Javascript forum for help there, I'm not big with JS.
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •