Not signed in (Sign In)

Vanilla 1.0.3 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorbrekk
    • CommentTimeAug 29th 2007
     
    Hi, I was wondering how you would go about setting first param of the SWFObject as a fullpath.

    var address = "http://www.mysite.com/indexNew.swf";
    var so = new SWFObject(address, "indexNew", "100%", "100%", "8", "#FFFFFF");
    so.addParam("scale", "noscale");
    so.write("flashcontent");

    When I try the above code, it ends up performing a redirect, as soon as the page loads, it goes directly to http://www.mysite.com/indexNew.swf

    Can anyone help me with this?
    • CommentAuthorAran
    • CommentTimeAug 29th 2007
     
    Brekk.

    There is not reason that I know of that would cause a redirection on full path definition. I have seen many projects using code similar to the above. You can try copying one of the exmple pages from the swfobject examples and replace it with your full path. I think you'll see it working as intended

    Can you please post your full HTML page so we can see what else is going on?
    • CommentAuthorbrekk
    • CommentTimeAug 29th 2007
     
    Hi Aran,

    Here's the code right now.

    <?php
    session_start();
    if(empty($_GET['artist'])){
    $redirect_value = "none";
    } else {
    //first variable in the post
    $artist = $_GET['artist'];
    if(!empty($_GET['project'])){
    //second variable in the post
    $project = $_GET['project'];
    } else {
    $project = "home";
    }
    //third variable in the post
    //$artwork = $_GET['artwork'];
    //command will default to xml unless it is one of the three other main treelocations
    $success = true;
    if($success == true){
    $artist_directory = "artists/" . $artist . "/" . $artist . "_xml.php";
    $redirect_value = $command . ":" . $artist_directory . "$" . $project;
    } else {
    $redirect_value = "none";
    }
    }
    //store the variables within the session.
    $_SESSION['redirect'] = $redirect_value;
    //echo "artist=$artist&project=$project<br />";
    //echo $redirect_value;
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <!-- saved from url=(0014)about:internet -->
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>my site</title>
    <!-- SWFObject embed by Geoff Stearns geoff@deconcept.com http://blog.deconcept.com/ -->
    <script type="text/javascript" src="http://www.mysite.com/scripts/swfobject.js"></script>
    <style type="text/css">

    /* hide from ie on mac \*/
    html {
    height: 100%;
    overflow: hidden;
    }

    #flashcontent {
    height: 100%;
    }
    /* end hide */

    body {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #FFF;
    }

    </style>
    <meta http-equiv="refresh" content="1800">
    <link rel="shortcut icon" href="favicon.ico" />
    </head>

    <body>

    <div id="flashcontent">
    <strong>Welcome to the lynching mob. <br />You need to upgrade your Flash Player to Version 8.</strong>
    </div>

    <script type="text/javascript">
    // <![CDATA[

    var so = new SWFObject("indexNew.swf", "indexNew", "100%", "100%", "8", "#FFFFFF");
    so.addParam("scale", "noscale");
    so.write("flashcontent");

    // ]]>
    </script>

    </body>
    </html>

    After a bit of tweaking, it no longer redirects, but it doesn't load the pages that I want (for the most part. To clarify that, I'm trying to implement clean URLs (tutorial here: http://www.kirupa.com/developer/php/clean_url_pg1.htm) , and if the url is www.mysite.com/firstvar , everything works fine, but if I try anything that ends with a / such as www.mysite.com/firstvar/ or www.mysite.com/firstvar/secondvar , it loads the page, replaces the div like it should, but doesn't display any content.

    Thanks for the prompt reply.
    • CommentAuthorpmel
    • CommentTimeSep 13th 2007
     
    Hello, I am also trying to implement clean urls. I have the same problem, my swf won't show up when the second "variable" or an extra backslash is typed in the url. I am wondering if this is an issue with the flash player or swfobject or neither. Have you found a solution or do you have any further thoughts on the subject?
    • CommentAuthorAran
    • CommentTimeSep 13th 2007
     
    Sorry for the dealy (and possible confusion). When I asked for the full HTML page I was actually meaning a link to the live page.

    Aran
    • CommentAuthorzhangsisi
    • CommentTimeOct 1st 2007
     
    I want to men friend ,trcut me , you can see me
    www.ConnectAsia.info/en/lang104082about_lili11
    thank you