Not signed in (Sign In)

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

    • CommentAuthorkade119
    • CommentTimeSep 5th 2007
     
    i have my flash content working w/ the swfobject but if the person doesn't have flash player how do i redirect to an only html page?
    • CommentAuthorphilip
    • CommentTimeSep 5th 2007
     
    the main idea is to put whatever HTML you want them to see in the "flashcontent" div. that way if they don't have flash, the page will still work for them.


    <div id="flashcontent">

    <h1>My Alternate HTML Content</h1>
    <p>Since you don't have Flash Player, you're
    seeing this HTML content instead.
    If you had Flash Player, a SWF
    would overwrite all of this stuff!</p>

    </div>


    but, if you really want to redirect people that don't have Flash Player (or the right version of Flash Player) to another page, you could do something like:


    var so = new SWFObject("movie.swf", "mymovie",
    "400", "100%", "8", "#336699");
    if(!so.write("flashcontent")){
    window.location = "my-other-page.html";
    }


    - philip
    • CommentAuthorsteveb
    • CommentTimeSep 7th 2007
     
    A variation I have used especially when the alternate material is graphic intensive and you don't want the alternate content to begin loading in the likely case the flash will replace it anyway. Put the alternate into a variable and write it afterward.

    var backup = '<img src="mybigimage.jpg" width="760" height="400" alt="" usemap="#myMap" border="0">';
    backup += '<map name="myMap" coords="0,0,100,100" href="nextpage.html">';
    if(!so.write("flashcontent")){
    document.getElementById('flashcontent').innerHTML=backup;
    }
    • CommentAuthorAran
    • CommentTimeSep 8th 2007
     
    Good comment Steve. You don't necessarily want to write alt content unless you know the user doesn't have flash. The 2 stage alt content is a good way only write what is actually required
    • CommentAuthorkade119
    • CommentTimeSep 12th 2007
     
    thanks philp and steve
    • CommentAuthorkade119
    • CommentTimeSep 14th 2007
     
    so any information in that div will be hidden if they have a flash player that will play the flash? what if the information is larger dimension wise than the flash presentation? will it still hide the html in the div?
    • CommentAuthorphilip
    • CommentTimeSep 14th 2007
     
    whatever is in the flashcontent div will be *replaced* by your SWF. not hidden, but obliterated. :)

    unless you hard-code the sizing of the DIV with CSS, the size of the DIV will shrink or expand to fit the content of your SWF.
    • CommentAuthorkade119
    • CommentTimeSep 14th 2007
     
    so if my flash movie is 500 in width but the css is 700px in width for my html... it will still work properly?
    • CommentAuthorkade119
    • CommentTimeSep 14th 2007
     
    obliterated , i love it!

    like asteroid wars stoneroids!
    • CommentAuthorkade119
    • CommentTimeSep 14th 2007
     
    or even space invaders!
    • CommentAuthorphilip
    • CommentTimeSep 14th 2007
     
    if your CSS hard-codes the DIV to be 700px, it will always be at least 700px. if you DON'T set your width in the CSS, it will expand to the SWF's width, which in this case would be 500px.

    speaking of asteroids, i was just talking to my friend the other day about the old arcade game Sinistar... trying to explain the "I hunger!" quote. seems not too many people remember that game.
    • CommentAuthoragentF
    • CommentTimeSep 17th 2007 edited
     
    Sinistar was one of my favorite games.
    • CommentAuthorzhangsisi
    • CommentTimeSep 29th 2007
     
    find love sex www.NewMeetings.info/en/lang101752about_sisi11
    • CommentAuthorphilip
    • CommentTimeSep 29th 2007
     
    that zhangsisi post is SPAM! don't use the URL!